#include< stdio.h >
#include< conio.h >
void main()
{
int a,b,c;
char op;
float d;
clrscr();
j:
printf("Enter 1st no:");
scanf("%d",&a);
printf("Enter 2st no:");
scanf("%d",&b);
fflush(stdin);
printf("Enter Operater:");
scanf("%c",&op);
switch(op)
{
case '+':
{
c=a+b;
printf("Answer:%d",c);
break;
}
case '-':
{
c=a-b;
printf("Answer:%d",c);
break;
}
case '*':
{
c=a*b;
printf("Answer:%d",c);
break;
}
case '/':
{
d=(float)a/(float)b;
printf("Answer:%f",d);
break;
}
case '%':
{
c=a%b;
printf("Answer:%f",c);
break;
}
default:
{
printf("\nCheck your entery:");
printf("\nSorry!!!\n Try again\n");
goto j;
}
}
getch();
}