Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.09 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. int main() {
  4.  
  5.     std::cout << "Hi! Do you want to play with me 7 =)" << std::endl;
  6.     std::string n;
  7.     std::cin >> n;
  8.     int l;
  9.     while (n.find("goodbye") || n.find("exit") || n.find("bye")) {
  10.         if (n.find("Yes") || n.find("yes") || n.find("da")) {
  11.             std::cout << "Well, what did he do this time?" << std::endl;
  12.             std::cout << "How much do you estimate his mistake?" << std::endl;
  13.  
  14.             std::cin >> l;
  15.             if (l > 8)
  16.             {
  17.                 std::cout << "It's horrible" << std::endl;
  18.             } else if (l <= 8 && l > 5)
  19.             {
  20.                 std::cout << "He is good boy,maybe he can fix it" << std::endl;
  21.             }
  22.  
  23.         } else if (l > 0 && l <= 5)
  24.         {
  25.             std::cout << "Sorry, we're just getting started." << std::endl;
  26.  
  27.         } else
  28.         {
  29.             std::cout << "It is string or negative number" << std::endl;
  30.             system("pause");
  31.         };
  32.         std::cout << "Write number again" << std::endl;
  33.         std::cin >> n;
  34.         system("pause");
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement