#include<stdio.h>
#include<conio.h>
void main()
{
int ch,result,n1,n2;
clrscr();
printf("Enter two number");
scanf("%d%d",&n1,&n2);
printf("1. Addition\n2. Subtract\n3. Multipication\n4. Divided\n5. modulas\n");
printf("Enter your choice\n");
scanf("%d",&ch);
switch(ch)
{
case 1:
result=n1+n2;
break;
case 2:
result=n1-n2;
break;
case 3:
result=n1*n2;
break;
case 4:
result=n1/n2;
break;
case 5:
result=n1%n2;
break;
default:
printf("Your Entered Choice is Worng ");
getch(); exit(1);
}
printf("Your Choice Result is =%d",result);
getch();
}
OUTPUT
Enter Two Number : 15
20

1. Addition
2. Subtract
3. Multipication
4. Divided
5. modulas
Enter Your Choice : 1
Your Choice Result is = 35

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA