Advertisement
EconomicSerg

Enter a number between 100 and 500

Jan 27th, 2021
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int number;
  9.  
  10.     cout << "Enter a number between 100 and 500: ";
  11.     cin >> number;
  12.     if (number >= 100 && number <= 500) {
  13.         cout << number;
  14.     }
  15.     else {
  16.         cout << "That number is not between 100 and 500!";
  17.     }
  18.  
  19.     return 0;
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement