************************************************************************/ #include <stdio.h> int main () { int a, b, c, i; a = 1; b = 1; for (i = 1; i <= 20 ;i ++) { printf (" %d", a); c = a + b; a = b; b = c; } printf ("\n"); return 0; }
Either the summary the OP gave is wrong or the code he gave is wrong.
I thought the Fibonacci series goes ...8,13,21... and not ...8,13,17... as stated.
Or both?
Well, the Fibanocci expansion is very, very similar to the Fibonacci series :)
at least in its first 8 terms...