This is comment for paste
Логические операции «и», «или», «не»
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string c1, c2, c3, cx;
- int h1, h2, h3, hx;
- cin >> c1 >> h1 >> c2 >> h2 >> c3 >> h3 >> cx >> hx;
- if (((c1 == cx) && (h1 == hx)) || ((c1 == cx) && (hx == -1)) || ((cx == "?"s) && (h1 == hx)) || ((cx == "?"s) && (hx == -1))) {
- cout << "1" << endl;
- }
- if (((c2 == cx) && (h2 == hx)) || ((c2 == cx) && (hx == -1)) || ((cx == "?"s) && (h2 == hx)) || ((cx == "?"s) && (hx == -1))) {
- cout << "2" << endl;
- }
- if (((c3 == cx) && (h3 == hx)) || ((c3 == cx) && (hx == -1)) || ((cx == "?"s) && (h3 == hx)) || ((cx == "?"s) && (hx == -1))) {
- cout << "3" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment