Advertisement
sheredega

task 13

Nov 4th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int a;
  8.     cin >> a;
  9.     while (a < 0) {
  10.         cout << "Number must`n be negative! Try again!" << endl;
  11.         cin >> a;
  12.     }
  13.     cout << "Your number is: " << a;
  14.  
  15.     return 0;
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement