/* Calculator using operators */ #include #include int main() { int a,b; char op; printf("Enter expression: "); scanf("%d %c %d",&a, &op, &b); if(op=='+') printf("Ans = %d", a+b); if(op=='-') printf("Ans = %d", a-b); system("pause"); }