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 house1, house2, house3, house4;
- cin >> house1 >> house2 >> house3 >> house4;
- if (house1 == house4) {
- cout << "Enter the house 1"s << endl;
- } if (house2 == house4) {
- cout << "Enter the house 2"s << endl;
- } if (house3 == house4) {
- cout << "Enter the house 3"s << endl;
- } if ((house1 != house4) && (house2 != house4) && (house3 != house4)) {
- cout << "Seek somewhere else"s << endl;
- }
- return 0;
- // трёх домов и цвет дома, где видели Пушистика
- // Выведите Enter the house X, если дом нужного цвета имеет номер X
- // Выведите Seek somewhere else, если дома нужного цвета нет
- }
Advertisement
Add Comment
Please, Sign In to add comment