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.26 KB | None | 0 0
  1.  
  2.  
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. {
  7.  
  8.     int a;
  9.     for (int j = 0; j < 3; j++)
  10.     {
  11.         do
  12.         {
  13.             cin >> a;
  14.  
  15.         } while (a < 0);
  16.     }
  17.     int counter = 1;
  18.     while (a >= counter)
  19.     {
  20.         cout << " " << counter;
  21.         counter++;
  22.     }
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement