fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c;
  6. char op, eq;
  7. cin >> a >> op >> b >> eq >> c;
  8. if (op == '+' && eq == '=' && a + b == c)
  9. cout << "YES";
  10. else
  11. cout << "NO";
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
NO