Category Archives: For loop

calculate compound interest – C Program

Compound Interest – C Program

write a c program of calculate compound interest of given amount

The compound interest is a interest of interest.
The Compound Interest is interest of the first period, add it to the total basic amount, and then calculate the interest for the next period, and so on…..

The c program output is :

 

check the number is prime or not – C Program

Prime or Not – C Program

Write a c program for check the inputted number is prime or not.

The prime number is divisible only by itself, and the rest of all numbers are composite.

Here is the c program for check the given number is prime or not using for loop.

The out put of check prime number c program is :

 

Print prime number – C Program

Prime number – C Program

Write a c program for print the prime number up to given number

Prime number is the number who divisible only by itself. The 2 is the minimum and first prime number.

In prime number series only 2 is even, all the rest of the prime number are odd.

The prime numbers are : 2 3 5 7 11 13 17 19………

Here is the example for print prime number up to inputted number. means we input any number and the result in display prime numbers up to that inputted number in c program.

The prime number of given number c program out put is :

 

Fibonacci series program using for loop in C Language

The Fibonacci Sequence is the series of numbers as below :
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,………………

Here is the C Program to understand Fibonacci Series using for loop.

Fibonacci Series using Recursion

Example of Fibonacci Series using for loop in C.

 

The output of program is :