Advertisement
DasShelmer

3.3.19

Oct 12th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6.     int i, j;
  7.  
  8.     // Основная реализация
  9.     for (i = 1; i < 10; i++)
  10.         for (j = 0; j < 10; j++)
  11.             cout << setw(4) << i * 101 + j * 10;
  12.     cout << endl;
  13.  
  14.     i = 1;
  15.     while (i < 10) {
  16.         j = 0;
  17.         while (j < 10) {
  18.             cout << setw(4) << i * 101 + j * 10;
  19.             j++;
  20.         }
  21.         i++;
  22.     }
  23.     cout << endl;
  24.  
  25.     i = 1;
  26.     do {
  27.         j = 0;
  28.         do {
  29.             cout << setw(4) << i * 101 + j * 10;
  30.             j++;
  31.         } while (j < 10);
  32.         i++;
  33.     } while (i < 10);
  34.  
  35.     return 0;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement