My photo
Bangalore, Karnataka, India
Extending one hand to help someone has more value rather than joining two hands for prayer

Archives

program to print a welcome screen?

Tuesday, September 1, 2009

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<process.h>
void viewall();
void help();
void exit_screen();
void newentry();
void welcome();
void main()
{
int gd=DETECT,h;
initgraph(&gd,&h,"c:/tc");
welcome();
}
void welcome()
{
clrscr();
int choice1;
setbkcolor(7);
setcolor(4);
outtextxy(190,190,"   *****************   ");
setcolor(6);
outtextxy(190,220,"   ENTER YOUR CHOICE   ");
setcolor(4);
outtextxy(190,250,"   ******************  ");
setcolor(6);
outtextxy(190,270,"1.  Enter a new entry  ");
outtextxy(190,285,"2.  See all enteries   ");
outtextxy(190,300,"3.  Need help ");
outtextxy(190,315,"4.  Exit   ");
cin>>choice1;
switch(choice1)
{
case 1:
newentry();
break;
case 2:
viewall();
break;
case 3:
help();
break;
case 4:
exit_screen();
break;
default:
clrscr();
setbkcolor(7);
setcolor(6);
outtextxy(190,270,"INVLAID CHOICE....");
getch();
welcome();
break;
}
}

void exit_screen()
{
clrscr();
setcolor(6);
outtextxy(190,190,"*******************************************  ");


outtextxy(190,280,"*******************************************");
setcolor(4);
outtextxy(190,220,"This master piece is brought To you From::");
delay(5000);
outtextxy(190,250,"           VIKAS KUNAL AND ANIL");

delay(5000);
clrscr();
setbkcolor(7);
setcolor(6);
outtextxy(190,190," **********************************************  ");


outtextxy(190,280," **********************************************");
setcolor(4);
outtextxy(190,220,"     For more msterpiece programs");
delay(5000);
outtextxy(190,250,"  contact at:9888163098,9779423162,9988070508   ");
getch();
exit(1);
}
void newentry()
{
clrscr();
setbkcolor(7);
setcolor(6);
outtextxy(190,200,"    U hv opened the new entry screen");
delay(5000);
outtextxy(190,250,"  press any key to go to main screen   ");
getch();
welcome();
}
void viewall()
{
clrscr();
setbkcolor(7);
setcolor(6);
outtextxy(190,200,"     u hv entered the screen to view all");
delay(5000);
outtextxy(190,250,"  press any key to go to main screen   ");

getch();
welcome();
}
void help()
{
clrscr();
setbkcolor(7);
setcolor(6);
outtextxy(190,200,"     u hv entered th screen to help");
delay(5000);
outtextxy(190,250,"  press any key to go to main screen   ");
getch();
welcome();
}

0 comments: