fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. // your code goes here
  5. int n=9, next;
  6. int first=0, sec=1;
  7.  
  8. for(int i=1;i<=n;i++){
  9. printf(" %d",first);
  10. next=first+sec;
  11. first=sec;
  12. sec=next;
  13. }
  14.  
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
 0 1 1 2 3 5 8 13 21