#include<stdio.h> int main(void) { double valuel,value2; char op;
printf("Type in an expression:"); scanf("%lf%c%lf",&value1,&op,&value2); switch(op){ case'+': printf("=%.2f ",valuel+value2); break; case'-': printf("=%.2f ",valuel-value2); break; case'/': printf("=%.2f ",valuelalue2); break; default: printf("Unknown operator "); break; } return 0; }