Editorial - ADDSUB

Problem Link - Contest Page | CodeChef
Author - amarnathsama
Tester - amarnathsama
Editorilist - apurv001
DIFFICULTY:
EASY

PREREQUISITES:
conditional operator

Reads integers, character strings, and integers separated by blanks, and conditional branches are performed when the read character string is “+” or “-”.

Code
int a , b ;
string op ;
cin >> a >> op >> b ;
if ( op == "+")
cout << a + b << endl ;
else
cout << a - b << endl ;