Write a program to find sum, difference, product of two number using switch case statement
Answers
Answered by
11
void main()
{
int a=5,b=12,choice;
print("Enter choice 1, 2 or 3");
scanf ("%d", &choice);
switch (choice)
{
case 1:
print("Sum of a and b = %d", a+b);
break;
case 2:
print("Difference between a and b = %d" , a-b);
break;
case 3:
print("Multiplication of A and B = %d", a*b);
break;
default:
print("Enter correct number");
break;
}
}
Similar questions