#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);
if(ch==1)
printf(“Result
is : %d”,(a+b));
else if(ch==1)
printf(“Result is : %d”,(a-b));
else if(ch==1)
printf(“Result is : %d”,(a*b));
else if(ch==1)
printf(“Result is : %d”,(a/b));
else
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