#include
#include
void main()
{
int num1,num2;
float total;
char mathoperator;
clrscr();
printf("Input First Number : ");scanf("%d",&num1);
printf("Input Second Number : ");scanf("%d",&num2);
printf("Input Operator [+, -, *, /]: ");scanf("%s",&mathoperator);
if (mathoperator =='+') total = num1+num2;
else if (mathoperator =='-') total = num1-num2;
else if (mathoperator =='*') total = num1*num2;
else if (mathoperator =='/') total = num1/num2;
else
{
printf("Wrong Operator\n");
printf("Press Any Key to Exit\n");
getch();
exit();
}
printf("Output : %d %c %d = %.0f",num1,mathoperator,num2,total);
getch();
}