This is comment for paste
Логические операции: сравнение / Задание 1
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string firstColor, secondColor, thirdColor, needColor;
- cin >> firstColor >> secondColor >> thirdColor >> needColor;
- int houseNum = (firstColor == needColor) + (secondColor == needColor) * 2 + (thirdColor == needColor) * 3;
- if (houseNum != 0) {
- cout << "Enter the house "s + to_string(houseNum) << endl;
- } else {
- cout << "Seek somewhere else"s << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment