/* Title calculater Author saurabh singh naruka Author Email cricket_naruka [at] yahoo.co.in Description SIMPLE CALCULATOR Category C++ » Algorithms Hits 924 */ Code : // Simple Calculator // // By: saurabh singh // // M.C.A. MAISM, jaipur // // Can have many Flaws // #include"stdio.h" #include"conio.h" #include"dos.h" #include"stdlib.h" #include"string.h" void DISPNUM(char *); void main() { clrscr(); _setcursortype(0); gotoxy(30,19); textcolor(GREEN+BLINK); cprintf("SIMPLE CALCULATOR"); gotoxy(50,21); textcolor(BLUE+BLINK); cprintf("By Rakesh Juyal"); getch(); // clrscr(); int x=30,y=10; textcolor(WHITE); gotoxy(x,y); cprintf("7 8 9"); gotoxy(x,y+2); cprintf("4 5 6"); gotoxy(x,y+4); cprintf("1 2 3"); gotoxy(x,y+6); cprintf("0"); textcolor(RED); gotoxy(x+5,y+6); cprintf(". ="); textcolor(GREEN); x=x+15; gotoxy(x,y); cprintf("/"); gotoxy(x,y+2); cprintf("*"); gotoxy(x,y+4); cprintf("-"); gotoxy(x,y+6); cprintf("+"); //Draw The For Calc// x=28;y=5; gotoxy(x,y); textcolor(WHITE); // ? & ? // cprintf("%c",218); gotoxy(28+20,y); cprintf("%c",191); // ? & ? // //Horiz. Boundary for(x=29;x<=28+19;x++) { gotoxy(x,y); cprintf("%c",196); gotoxy(x,y+12); cprintf("%c",196); } //End of Horiz. Bound // U & A // cprintf("%c",217); x=28;y=y+12; gotoxy(x,y); cprintf("%c",192); //End of U & A // //Vertic. Bound. for(y=6;y<=16;y++) { gotoxy(x,y); cprintf("%c",179); gotoxy(x+20,y); cprintf("%c",179); } //End of Vertic Bou. y=6; for(x=30;x<=30+16;x++) { gotoxy(x,y); cprintf("%c",196); gotoxy(x,y+2); cprintf("%c",196); } gotoxy(30,y+1); cprintf("%c %c",179,179); gotoxy(30,y); cprintf("%c",218); gotoxy(30+16,y); cprintf("%c",191); gotoxy(30,y+2); cprintf("%c",192); gotoxy(30+16,y+2); cprintf("%c",217); //End of Vertic Bound. //OutPut at X=30,Y=8// char ch; char operand1[15]="",operand2[15]="",BLANK[15]=" "; char operator1,first='y'; long double num1=0,num2=0; int i=0,ERROR=0; //Digits int MAX=10; DISPNUM(0); do { ch=getch(); if(ch=='x1b') { for(int i=1000;i>=200;i=i-50) { sound(i); delay(100); } nosound(); break; } //Numeric// if((ch>='0')&&(ch<='9')) { if(i