fork download
  1. #include <stdio.h>
  2. int seq(){
  3. static int a=1,b=1,c;
  4. c=a+b;
  5. a=b;
  6. b=c;
  7. return c;
  8. }
  9.  
  10. int main(void) {
  11. int i;
  12. for(i=3;i<=10;i++)
  13. printf("%d\n",seq());
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
2
3
5
8
13
21
34
55