/* write a c program to simulate a simple calculate that performs arithmetic operations like addition, substraction, multiplication, and division only on integers. Error message should be reported, if any attempt is made to divide by zero. Use switch statements*/ #include #include int main() { int a,b; char c; printf("\n Enter the two integer numbers:\n"); scanf("%d%d",&a,&b); printf("\n For addition enter: +"); printf("\n For substraction :-"); printf("\n For multiplication :*"); printf("\n For division :/"); flushall(); printf("\n Enter your choice:"); scanf("%c",&c); switch(c) { case '+': printf("\n Sum of two numbers %d",a+b); break; case '-': printf("\n Difference of two numbers %d",a-b); break; case '*': printf("\n Multiplication of two numbers %",a*b); break; case '/': if(b==0) { printf("\n Error"); break; } printf("\n Division of two numbers %d ",a/b); break; default:printf("\n Error"); } return 0; }