IIaJIpaTiN
Feb 23rd, 2023
52
1
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 firstColor, secondColor, thirdColor, needColor;
  8.     cin >> firstColor >> secondColor >> thirdColor >> needColor;
  9.     int houseNum = (firstColor == needColor) + (secondColor == needColor) * 2 + (thirdColor == needColor) * 3;
  10.     if (houseNum != 0) {
  11.         cout << "Enter the house "s + to_string(houseNum) << endl;
  12.     } else {
  13.         cout << "Seek somewhere else"s << endl;
  14.     }
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment