fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a=1,b=1,r;
  7. int i =0;
  8. for(i=0;i<=6;i++)
  9. {
  10. r= a+b;
  11. a=b;
  12. b=r;
  13.  
  14. cout<<r<<endl;
  15. //cout<<b<<endl;
  16.  
  17. }
  18. return 0;
  19. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
2
3
5
8
13
21
34