#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c,k;
clrscr();
printf("1 for Addition\n2 for Substract\n3 for Multiplication\n4 Devision");
printf("\n\nEnter Your Choise : ");
scanf("%d",&k);
printf("Enter First Value");
scanf("%d",&a);
printf("Enter Second Value");
scanf("%d",&b);
switch(k)
{
case 1:
c=a+b;
printf("Ans= %d",c);
break;
case 2:
c=a-b;
printf("Ans= %d",c);
break;
case 3:
c=a*b;
printf("Ans= %d",c);
break;
case 4:
c=a/b;
printf("Ans= %d",c);
break;
default:
printf("wrong input");
}
getch();
}
No comments:
Post a Comment