Advertisement
JUN7

nested loop one

Nov 24th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. main()
  6. {
  7.     int a, b;
  8.    
  9. cout<<"               ________________________________ "<<endl;
  10. cout<<"              |                                |  "<<endl;
  11. cout<<"              |         NESTED LOOP ONE        | "<<endl;
  12. cout<<"              |________________________________| "<<endl;
  13. cout<<"         "<<endl;
  14.    
  15.     for (a=1; a <= 8; a++){
  16.         for (b=1; b <= a; b++){
  17.             cout << a;
  18.         }
  19.        
  20.         cout << "\n";
  21.     }
  22. }
  23.  
  24. /**
  25. 1
  26. 22
  27. 333
  28. 4444
  29. 55555
  30. 666666
  31. 7777777
  32. 88888888
  33. **/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement