View Code of Problem 3855

#include <iostream>
#include <vector>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <set>
#include <vector>
using namespace std;
int main(){
	int t;
	cin>>t;
	while(t--){
		int a,b;
		char c;
		scanf("%d%c%d",&a,&c,&b);
		if(c=='+')
			cout<<a+b<<endl;
		else cout<<a-b<<endl;
	}
    return 0;
}

Double click to view unformatted code.


Back to problem 3855