fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a=1, b=1,c;
  6.  
  7.  
  8. cout<<a<<" "<<b<<" ";
  9. for(int i;i<10;i++)
  10. {
  11. c=a+b;
  12. cout<<c<<" ";
  13. a=c+b;
  14. cout<<a<<" ";
  15. b=a+c;
  16. cout<<b<<" ";
  17.  
  18. }
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5552KB
stdin
Standard input is empty
stdout
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765 10946 17711 28657 46368 75025 121393 196418 317811 514229 832040 1346269 2178309