#include <stdio.h>
int main()
{
int firstnum,secondnum,result;
char operation,dummy;
printf("Enter the first number:");
scanf("%d",&firstnum);
printf("Enter the operation(+or-):");
scanf("%c%c",&dummy,&operation);
printf("Enter the second number:");
scanf("%d",&secondnum);
if(operation=='+')
{
result=firstnum+secondnum;
printf("%d + %d = %d.\n",firstnum,secondnum,result);
}
if(operation=='-')
{
result=firstnum-secondnum;
printf("%d - %d = %d.\n",firstnum,secondnum,result);
}
if(operation=='*')
{
result=firstnum*secondnum;
printf("%d * %d = %d.\n",firstnum,secondnum,result);
}
if(operation=='/')
{
result=firstnum/secondnum;
printf("%d / %d = %d.\n",firstnum,secondnum,result);
}
getch();
}