Ok, now i've try assign long type to it, and a little formatting for it show nicely.
But, stil no luck. The output still the same.(but the formatting works!!)
Code:
#include<conio.h>
#include<stdio.h>
int n=0;
long Fib(int n);
void main()
{
clrscr();
int seriesSize = 35;
printf("Print a Fibonacci series.\n");
for (int looper=0;looper<seriesSize;looper++)
{
if (looper %5)
printf(", %8ld",Fib(looper));
else
printf("\n%8ld",Fib(looper));
}
getch();
}
long Fib(int n)
{
int x;
if (n==0)
x = 0;
else if (n==1)
x = 1;
else
x=Fib(int(n-1))+Fib(int(n-2));
return (x);
}
And i haven't learn about double type. = =
Am i mistaken?