uprborder();
cout<<"\n\n\n\n\n\n\n\t\t\t\t
Game Over!";
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\nMain Menu= 1\t\t\t\t\t\t\t\tExit= 0\n";
for (int i=1 ; i<81 ; i++)
21

{
printf("%c",177);
}
int l;
cin>>l;
switch (l)
{
case 1 : goto instagain;
break;
case 0 : goto end;
break;
}
}
}
else if (n==2)
// instructions tobe viewed
{
int n;
system("cls");
n=instructions();
if(n==1)
// for going back to main menu
{
system("cls");
goto instagain;
}
else if (n==0)
{
goto end;
}
}
else if (n==3)
// for viewing credits
{
system("cls");
int n;
22

n=credits();
if(n==1)
// for going back to main menu
{
system("cls");
goto instagain;
}
else if (n==0)
{
goto end;
}
}
else
{
goto end;
}
end:
getch();
}
// upper border function
void uprborder()
{
cout<<endl;
for (int i=1 ; i<81 ; i++)
{
printf("%c",177);
}
}
//intro display
void intro()
{
system("color 7");
Sleep(1000);
23

// Q
cout<<"t\t\t\t\t.***.\n";
cout<<"\t\t\t\t**
**\n";
cout<<"\t\t\t\t**
**\n";
cout<<"\t\t\t\t**
**\n";
cout<<"\t\t\t\t '***''****\n";
cout<<"\n\n\n\n\n\n\n\t\t\t\tLoading\n\n";
Sleep(1000);
system("cls");
// U
cout<<"\n\n\n\n\n\n\t\t\t\t**
**";
cout<<"\n\t\t\t\t**
**";
cout<<"\n\t\t\t\t**
**";
cout<<"\n\t\t\t\t**
**";
cout<<"\n\t\t\t\t '***'\n";
cout<<"\n\n\n\n\n\n\n\t\t\t\tLoading.\n\n";
Sleep(1000);
system("cls");
// I
cout<<"\n\n\n\n\n\n\t\t\t\t*******\n";
cout<<"\t\t\t\t
***\n";
cout<<"\t\t\t\t
***\n";
cout<<"\t\t\t\t
***\n";
cout<<"\t\t\t\t*******\n";
cout<<"\n\n\n\n\n\n\n\t\t\t\tLoading..\n\n";
Sleep(1000);
system("cls");
// Z
cout<<"\n\n\n\n\n\n\t\t\t\t*******\n";
cout<<"\t\t\t\t
***\n";
cout<<"\t\t\t\t
***\n";
cout<<"\t\t\t\t ***\n";
cout<<"\t\t\t\t*******\n";
cout<<"\n\n\n\n\n\n\n\t\t\t\tLoading...\n\n";
Sleep(1000);
24

system("cls");
// THE
cout<<"\n\n\n\n\n\n\t\t\t*******\t**
**\t*******\n";
cout<<"\t\t\t
***\t**
**\t***\n";
cout<<"\t\t\t
***\t******\t*******\n";
cout<<"\t\t\t
***\t**
**\t***\n";
cout<<"\t\t\t
***\t**
**\t*******\n";
cout<<"\n\n\n\n\n\n\n\t\t\t\tLoading
....
\n\n";
Sleep(1000);
system("cls");
system("color 7");
// GAME
cout<<"\n\n\n\n\n\n\t\t\t
***\t **** \t**
**
*******\n";
cout<<"\t\t\t*'
\t**
**\t***
***
***\n";
cout<<"\t\t\t**
- \t******\t** * * **
*******\n";
cout<<"\t\t\t**
*\t**
**\t**
*
**
***\n";
cout<<"\t\t\t '**'\t**
**\t**
**
*******\n";
cout<<"\n\n\n\n\n\n\n\t\t\t\tLoading
.....
\n\n";
Sleep(1000);
system("cls");
}
// main diplay function
int display()
// the first main display to start game
{
system("Color 7");
// console color selector
cout<<endl;
for (int i=1 ; i<32 ; i++)
// full ascii designs
{
printf("%c",177);
}
cout<<"********************QUIZ THE GAME***********************";
for (int i=1 ; i<33 ; i++)
{
25

printf("%c",177);
}
cout<<"\n\n\n\n\n\t\t\t\t1.Play";
// some instructions for users
cout<<"\n\n\t\t\t\t2.Instructions";
cout<<"\n\n\t\t\t\t3.Credits";
cout<<"\n\n\t\t\t\t4.Exit";
cout<<"\n\n\n\n\n\n\n\n\n";
cout<<"\t\t\t\t\t\t
Press Any Key From 1 To 4...\n";
for (int i=1 ; i<81 ; i++)
// for lower boarder
{
printf("%c",177);
}
int n;
cin>>n;
return n;
}
// instructions function
int instructions()
{
uprborder();
cout<<"\n\n\t\t\t\tINSTRUCTIONS\n"<<"\nA Quiz Game. You will be asked questions
related to general knowledege or\nanything. You will be given four options.\nAll you
have to select or enter the right answer.";
cout<<"\nYou can start from different level of difficulty or the level will
increase\nautomatically if you answered 5 questions correctly.";
cout<<"\nEasy level has 5 score each Question.";
cout<<"\nMedium level has 10 score each Question";
cout<<"\nHard level has 15 score each Question";
cout<<"\n\n\n\n\n\n\n\n\n";
cout<<"Back:Press 1\t\t\t\t\t\t\tExit:Press Zero\n";
for (int i=1 ; i<81 ; i++)
{
printf("%c",177);
}
int n;
cin>>n;
26

return n;
}
// credits function
int credits()
{
uprborder();
cout<<"\n\n\tThis is the summer training project, Quiz Game . Made by";
cout<<"\n\n\n\t\t\tName:Abul bashar khan\n\t\t\t\t\t";
cout<<"\n\t\t\t\tReg:11719775";
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
cout<<"Back:Press 1\t\t\t\t\t\t\tExit:Press Zero\n";
for (int i=1 ; i<81 ; i++)
{
printf("%c",177);
}
int n;
cin>>n;
return n;
}

