EmbLogic's Blog

fibonacci series

1 #include <stdio.h>
2 int main()
3 {
4         int i=0;
5         int j=1;
6         printf(“%d”, i);
7         printf(” %d”,j);
8         int k,a,sum;
9         for (k=0;k<=10;k++)
10         {
11                 sum=i+j;
12                 a=sum;
13                 i=j;
14                 j=a;
15                 printf(” %d”,sum);
16         }
17 }
~
~
~
~
~
~
~
“fibonacci.c” 17L, 186C                                      7,2-9         All

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>