Advertisement
chevengur

Вводный курс: основы C++ | Урок 4: Логические операции: сравнение 1/3

Aug 21st, 2023 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     string color1, color2, color3, color_push;
  7.     std::cin >> color1 >> color2 >> color3 >> color_push;
  8.     if (color_push == color1) {
  9.         std::cout << "Enter the house 1";
  10.     }
  11.     else if (color_push == color2) {
  12.         std::cout << "Enter the house 2";
  13.     }
  14.     else if (color_push == color3) {
  15.         std::cout << "Enter the house 3";
  16.     }
  17.     else
  18.         std::cout << "Seek somewhere else";
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement