ZateRok
May 21st, 2023
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     string house1, house2, house3, house4;
  8.     cin >> house1 >> house2 >> house3 >> house4;
  9.     if (house1 == house4) {
  10.         cout << "Enter the house 1"s << endl;
  11.     } if (house2 == house4) {
  12.         cout << "Enter the house 2"s << endl;
  13.     } if (house3 == house4) {
  14.         cout << "Enter the house 3"s << endl;
  15.     } if ((house1 != house4) && (house2 != house4) && (house3 != house4)) {
  16.         cout << "Seek somewhere else"s << endl;
  17.     }
  18.     return 0;
  19.          // трёх домов и цвет дома, где видели Пушистика
  20.     // Выведите Enter the house X, если дом нужного цвета имеет номер X
  21.     // Выведите Seek somewhere else, если дома нужного цвета нет
  22. }
Advertisement
Add Comment
Please, Sign In to add comment