Write a menu-driven program in C using a switch case to calculate Addition, Subtraction, Multiplication, and Division.

--------------------------
2. substract two number
3. multiply two number
4. divide two number
5. break
----------------------------

``````
#include<stdio.h>
int main()
{
int a,b,choice;
float c,d;
while(choice!=5)
{
printf("\n--------------------------");
printf("\n2.substract two number");
printf("\n3.multiply two number");
printf("\n4.divide two number");
printf("\n5.break");
printf("\n----------------------------");
scanf("%d",&choice);
switch(choice)
{
case(1):
printf("\nenter two numbers");
scanf("%d%d",&a,&b);
printf("\naddition of two number is %d",a+b);
break;
case(2):
printf("\nenter two numbers");
scanf("%d%d",&a,&b);
printf("\nsubstraction of two number is %d",a-b);
break;
case(3):
printf("\nenter two numbers");
scanf("%d%d",&a,&b);
printf("\nmultiplication of two number is %d",a*b);
break;
case(4):
printf("\nenter two numbers");
scanf("%f%f",&c,&d);
printf("\ndivision of two number is %f",c/d);
break;
case(5):
break;

default:
printf("\nwrong choice");
break;
}
}
return 0;
}
``````

## output

```--------------------------
2. substract two number
3. multiply two number
4. divide two number
5. break
----------------------------
enter two numbers:10    20
addition of two number is 30
--------------------------
2. substract two number
3. multiply two number
4. divide two number
5. break
----------------------------
enter two numbers:20    5
substraction of two number is 15
--------------------------
2. substract two number
3. multiply two number
4. divide two number
5. break
----------------------------
enter two numbers:4     3
multiplication of two number is 12
--------------------------
2. substract two number
3. multiply two number
4. divide two number
5. break
----------------------------