Here you have the code of a Fibonacci progresion.
Code:
//---------------------------------------------------------------------------
#pragma hdrstop
//---------------------------------------------------------------------------
#include <stdio.h>
#pragma argsused
int main(int argc, char* argv[])
{
int n, a, b, c;
printf("Introduzca el numero de terminos: ");
scanf("%i", &n);
do {
a=1;
b=1;
printf("%i, ", a);
c++ ;
}while (c<2);
do{
a=(a+b);
b=a;
printf("%i, ", a);
c++;
}while (c<n);
getchar();
return 0;
return 0;
}
//---------------------------------------------------------------------------