desislava_topuzakova

05. Number 100...200

Jan 15th, 2022
1,103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.  
  7.     //1. цяло число
  8.     //2. проверка за числото
  9.         // ако < 100 -> "Less than 100"
  10.         // ако <= 200 -> "Between 100 and 200"
  11.         // ако > 200 -> "Greater than 200"
  12.  
  13.     int number;
  14.     cin >> number;
  15.  
  16.     if (number < 100)
  17.     {
  18.         cout << "Less than 100";
  19.     }
  20.     else if (number <= 200)
  21.     {
  22.         cout << "Between 100 and 200";
  23.     }
  24.     else if (number > 200)
  25.     {
  26.         cout << "Greater than 200";
  27.     }
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment