CPP   98

nested forloops

Guest on 20th April 2022 02:14:25 AM

  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5.  {
  6.     // outer loop
  7.     for(int i=1;i<=10;i++) {
  8.            // Inner loop
  9.            for(int j=1;j<=10;j++) {
  10.                 cout << i*j << "\t";
  11.            }
  12.            // Skip a line.
  13.            cout << endl;
  14.  
  15.     }
  16.     return 0;
  17. }

Raw Paste


Login or Register to edit or fork this paste. It's free.