As we have started C Programming coding with Example Series, We have published last posts

"Write A Program For SUM of Infinite HP"

"Write A Program To Find SUM of AP" and

"Write A Program To Find SUM of GP Sequence".

We have chosen to start with Arithmetic Series and in this post you will find some basic idea and some useful concepts about Fibonacci Numbers .You can download C Codes below.Please let us know your feedback.

A working Example of FOR Loop

Example:

#include <stdio.h>

int main()

{

int x;

/* The loop goes while x < 10, and x increases by one every loop*/

for ( x = 0; x < 10; x++ )

{

/* Keep in mind that the loop condition checks

the conditional statement before it loops again.*/

printf( "%d\n", x );

}

getchar();

}

Arrays are of two types:

A. One-dimensional arrays

B. Multidimensional arrays

"Write A Program For SUM of Infinite HP"

"Write A Program To Find SUM of AP" and

"Write A Program To Find SUM of GP Sequence".

We have chosen to start with Arithmetic Series and in this post you will find some basic idea and some useful concepts about Fibonacci Numbers .You can download C Codes below.Please let us know your feedback.

In this post we are doing again Fibonacci Series but with different approach.In last post "Fibonacci Progression Using While Loop" you will see how to generate Fibonacci Numbers by using concepts of Do-While Loop.In this post we will talk about another loop i.e. For Loop and side by side Concept of Arrays will be discussed and demonstrated.

__Fibonacci Series - Sequence ( Using Array And For Loop ) Video Tutorial(See C- Codes Below )__:

__For Loop Concept__: FOR Loops are the most useful type. The syntax for a for loop is

for ( variable initialisation; condition; variable update ) {

Code to execute while the condition is true

}

Code to execute while the condition is true

}

A working Example of FOR Loop

Example:

#include <stdio.h>

int main()

{

int x;

/* The loop goes while x < 10, and x increases by one every loop*/

for ( x = 0; x < 10; x++ )

{

/* Keep in mind that the loop condition checks

the conditional statement before it loops again.*/

printf( "%d\n", x );

}

getchar();

}

__Array Concept__: Arrays may be defined as a kind of data structure that can store a fixed-size sequential collection of elements of the same type.An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.

A. One-dimensional arrays

B. Multidimensional arrays