CLICK HERE FOR BLOGGER TEMPLATES AND MYSPACE LAYOUTS »

Saturday, February 14, 2009



#include
#include
#include
#include
void loop();
void main()
{
clrscr();
int x, y, a, b;
for(x=1;x<=77;x++) { gotoxy(2+x,1);textcolor(LIGHTRED);cprintf("Í"); gotoxy(2+x,24);textcolor(LIGHTRED);cprintf("Í"); } for(y=1;y<=22;y++){ gotoxy(3,1+y);textcolor(LIGHTRED);cprintf("º"); gotoxy(79,1+y);textcolor(LIGHTRED);cprintf("º"); } gotoxy(3,1);textcolor(RED);cprintf("É"); gotoxy(3,24);textcolor(YELLOW);cprintf("È"); gotoxy(79,1);textcolor(GREEN);cprintf("»"); gotoxy(79,24);textcolor(YELLOW);cprintf("¼"); for(a=1;a<=49;a++) { gotoxy(15+a,4);textcolor(YELLOW);cprintf("ß"); gotoxy(15+a,17);textcolor(YELLOW);cprintf("Ü"); } for(b=1;b<=14;b++) { gotoxy(16,3+b);textcolor(GREEN);cprintf("Þ"); gotoxy(65,3+b);textcolor(RED);cprintf("Ý "); } for(int d=1;d<=5;d++) { loop(); } int choose,sum,dif,pro,quo; gotoxy(28,3);textcolor(YELLOW+BLINK);cprintf("W E L C O M E \! \! \!"); gotoxy(30,5);textcolor(LIGHTBLUE);cprintf("[A]\tADDITION"); gotoxy(30,6);textcolor(LIGHTGREEN);cprintf("[B]\tSUBTRACTION"); gotoxy(30,7);textcolor(LIGHTRED);cprintf("[C]\tMULTIPLICATION"); gotoxy(30,8);textcolor(YELLOW);cprintf("[D]\tDIVISION"); gotoxy(30,9);textcolor(CYAN);cprintf("[E]\t Exit"); gotoxy(25,12);textcolor(LIGHTBLUE);cprintf("Enter LETTER of your choice; -1 to exit:"); scanf("%s",&choose); switch(choose) { case'A': { clrscr(); while(x!=-1){ textcolor(LIGHTBLUE);cprintf("\t\t\tEnter first number; -1 to exit:"); scanf("%d",&x); sum=x+x; if(x==-1){ printf("Sum of all number is %d\n",sum); main(); getch(); break; } } } case 'B': { clrscr(); while(x!=-1){ textcolor(YELLOW);cprintf("\t\t\tEnter number here;-1 to exit:"); scanf("%d",&x); dif=dif - x;} if(x==-1){ printf("Difference of all number is %d",dif); main(); getch(); break; } } case 'C': { clrscr(); while(x!=-1){ textcolor(LIGHTRED);cprintf("\t\t\tEnter first number; -1 to exit:"); scanf("%d",&x); pro=pro * x; } if(x==-1){ printf("Product of all number is %d",pro); main(); getch(); break; } } case 'D': { clrscr(); while(x!=-1){ textcolor(LIGHTGREEN);cprintf("\t\t\tEnter first number; -1 to exit:"); scanf("%d",&x); quo=quo / x;} if(x==-1){ printf("Qoutient of all number is %d",quo); main(); getch(); break; } } case 'E': { gotoxy(32,15);textcolor(LIGHTRED+BLINK);cprintf("Good Bye!!!!!!"); getch(); } } }

0 comments: