Advertisement
desislava_topuzakova

03. Speed Info

Jan 17th, 2021
740
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.    //<= 10 -> slow
  7.    // <= 50 -> average
  8.     //<= 150 -> fast
  9.     //<= 1000 -> ultra fast
  10.     //> 1000 -> extremely fast
  11.  
  12.     double speed;
  13.     cin >> speed;
  14.  
  15.     if (speed <= 10) {
  16.         cout << "slow" << endl;
  17.     } else if (speed <= 50) {
  18.         cout << "average" << endl;
  19.     } else if (speed <= 150) {
  20.         cout << "fast" << endl;
  21.     } else if (speed <= 1000) {
  22.         cout << "ultra fast" << endl;
  23.     } else if (speed > 1000) {
  24.         cout << "extremely fast" << endl;
  25.     }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement