#include<conio.h>
#include<stdio.h>
void main()
{
int a,b,ch;
printf(“Enter any
two numbers \t”);
scanf(“%d%d”,&a,&b);
printf(“1 –
Addition\n2-Subtraction\n3-Multiplication\n4-Division\n Your Choice : ”);
scanf(“%d”,&ch);
switch(ch)
{
case 1:
printf(“Result is : %d”,(a+b));
break;
case 2:
printf(“Result is : %d”,(a-b));
break;
case 3:
printf(“Result is : %d”,(a*b));
break;
case 4:
printf(“Result is : %d”,(a/b));
break;
default:printf(“Invalid
Choice”);
}
getch();
}
OUTPUT :
Enter any two number 6 2
1-Addition
2-Subtraction
3-Multiplication
4-Division
Your Choice : 2
Result is : 4
0 comments:
Post a Comment