Submission #1676504
Source Code Expand
#include <iostream> #include <string> using namespace std; int main() { int A; int B; int C; cin >> A; cin >> B; cin >> C; if (A + B = C && A - B = C) { cout << "?" << endl; } else if (A + B = C) { cout << "+" << endl; } else if (A - B = C) { cout << "-" << endl; } else { cout << "!" << endl; } }
Submission Info
Submission Time | |
---|---|
Task | B - A±B Problem |
User | supadennjarasu |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 326 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:13:24: error: lvalue required as left operand of assignment if (A + B = C && A - B = C) ^ ./Main.cpp:17:16: error: lvalue required as left operand of assignment else if (A + B = C) ^ ./Main.cpp:21:16: error: lvalue required as left operand of assignment else if (A - B = C) ^