Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6. int numA = 1;
  7. int numB = 2;
  8. int numC = 0;
  9.  
  10. for(int i = 1; i <= 100; i++){
  11.  
  12. numC = numA + numB;
  13. numA = numB;
  14. numB = numC;
  15.  
  16. cout << numC << endl;
  17. }
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement