#include<stdio.h>
#include<conio.h>
#include<graphics.h>
main()
{
int gd=DETECT,gm;
int l,m,n,d,e;
clrscr();
initgraph(&gd,&gm,".");
gotoxy(12,28);
printf("\n\n\n\n\n\n");
printf("\t\t\t");
printf("*****************************");
printf("\t\t\t");
printf("\n\n");
printf("\t\t\tE N T E R T H E O P T I O N\n");
printf("\t\t\t");
printf("\n\t\t\t\******************************");
printf("\n\n");
printf("\t\t\t\t 1.ADD\n");
printf("\t\t\t\t 2.SUB\n");
printf("\t\t\t\t 3.DIV\n");
printf("\t\t\t\t 4.MUL\n");
printf("\t\t\t\t 5.EXIT\n");
rectangle(135,75,490,280);
printf("\n");
printf("\t\t\t E N T E R T H E V A L U E S:");
scanf("%d",&n);
clrscr();
printf("\n\n\n\n\n\n");
printf("\t\t E N T E R T H E V A L U E :L , M :");
printf("\n");
scanf("%d %d",&l,&m);
gotoxy(12,28);
rectangle(135,75,490,280);
clrscr();
switch(n)
{
case 1:
d=l+m;
printf("\n\n\n\n\n\n\n\n\n\n\n");
printf("\t\t\t\t\ A D D T I O N = % d",d);
printf("\n\n P R O G R A M H A S E N D F O R T H I S O P E R A C T I O N");
break;
case 2:
d=l-m;
printf("\n\n\n\n\n\n\n\n\n\n\n");
printf("\t\t\t\t\ S U B T R A C T = % d",d);
printf("\n\n");
printf("\n P R O G R A M H A S E N D F O R T H I S O P E R A C T I O N");
break;
case 3:
d=l/m;
e=l%m;
printf("\n\n\n\n\n\n\n\n\n");
printf("\t\t\t\t\ Q U E F I C E N T = % d\n",d);
printf("\n");
printf("\t\t\t\t\ R E M I N D E R = % d",e);
printf("\n\n");
printf("\tP R O G R A M H A S E N D F O R T H I S O P E R A C T I O N");
break;
case 4:
d=l*m;
printf("\n\n\n\n\n\n\n\n\n\n\n");
printf("\t\t\t\t\ M U L T I P L A Y = % d",d);
printf("\n\n");
printf(" P R O G R A M H A S E N D F O R T H I S O P E R A C T I O N");
break;
case 5:
exit();
default:
break;
}
getch();
}
No comments:
Post a Comment