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