#include
#include
void main()
{
int choice,sum,sub,multi,div,rem,a,b,y;
clrscr();
n:printf("enter ur choice\n1. sum\n2. sub\n3.multi\n4.div\n5.rem\n6. stop");
scanf("%d",&choice);
p:switch(choice)
{
case 1:printf("\ne.two no.");
scanf("%d%d",&a,&b);
sum=a+b;
printf("%d",sum);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 2:printf("\ne.two no.");
scanf("%d%d",&a,&b);
sub=a-b;
printf("%d",sub);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 3:printf("\ne.two no.");
scanf("%d%d",&a,&b);
multi=a*b;
printf("%d",multi);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 4:printf("\ne.two no.");
scanf("%d%d",&a,&b);
div=a/b;
printf("%d",div);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 5:printf("\ne.two no.");
scanf("%d%d",&a,&b);
rem=a%b;
printf("%d",rem);
printf("\ndo u want continue\npress1 for YES\npress2 for NO");
scanf("%d",&y);
if(y==1)
goto p;
else
goto n;
break;
case 6:printf("\nbye");
}
getch();
}
No comments:
Post a Comment