Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. int main()
  2. {
  3.     int a;
  4. for (int j = 0; j < 3; j++)
  5. {
  6.     do
  7.     {
  8.         cin >> a;
  9.  
  10.     } while (a < 0);
  11.  
  12.     cout << " " << endl;
  13.     int counter = 1;
  14.     while (a >= counter)
  15.     {
  16.         cout << " " << counter;
  17.         counter++;
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement