View Code of Problem 3855

#include "stdio.h"
#include "string.h"

void main()
{
	char c;
	int t,a,b;
	int x,i,j;
	scanf("%d",&t);
	for(x=0;x<t;x++)
	{
		scanf("%d%c%d",&a,&c,&b);
		if(c=='+')
			printf("%d\n",a+b);
		if(c=='-')
			printf("%d\n",a-b);
	}

}

Double click to view unformatted code.


Back to problem 3855