Quiz game project in cpp

 #include<iostream>

#include<windows.h>

using namespace std;

void color()

{

system("color 5");

Sleep(100);

system("color b4");

Sleep(100);

system("color b3");

Sleep(100);

system("color b7");

Sleep(100);

system("color a1");

Sleep(100);

system("color a4");

Sleep(100);

system("color b4");

Sleep(100);

system("color c3");

Sleep(100);

system("color a5");

Sleep(100);

system("color b4");

Sleep(100);

system("color c4");

Sleep(100);

system("color b4");

Sleep(100);

system("color a2");

Sleep(100);

system("color b4");

Sleep(100);

system("color 2");

system("color 5");

Sleep(100);

system("color b4");

Sleep(100);

system("color b3");

Sleep(100);

system("color b7");

Sleep(100);

system("color a1");

Sleep(100);

system("color a4");

Sleep(100);

system("color b4");

Sleep(100);

system("color c3");

Sleep(100);

system("color a5");

Sleep(100);

system("color b4");

Sleep(100);

system("color c4");

Sleep(100);

system("color b4");

Sleep(100);

system("color a2");

Sleep(100);

system("color b4");

Sleep(100);

system("color 2");

system("color 5");

Sleep(100);

system("color b4");

Sleep(100);

system("color b3");

Sleep(100);

system("color b7");

Sleep(100);

system("color a1");

Sleep(100);

system("color a4");

Sleep(100);

system("color b4");

Sleep(100);

system("color c3");

Sleep(100);

system("color a5");

Sleep(100);

system("color b4");

Sleep(100);

system("color c4");

Sleep(100);

system("color b4");

Sleep(100);

system("color a2");

Sleep(100);

system("color b4");

Sleep(100);

system("color 2");

}

void menu()

{

HANDLE q= GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(q,FOREGROUND_GREEN | FOREGROUND_INTENSITY);

cout<<"\xBD"<<endl;

                                                                                                                                          

cout<<"\t    ,o888888o.     8 8888      88  8 8888  8888888888',8888'               ,o888888o.          .8.                   ,8.       ,8.          8 8888888888"<<endl;   

cout<<"\t . 8888     `88.   8 8888      88  8 8888         ,8',8888'               8888     `88.       .888.                 ,888.     ,888.         8 8888         "<<endl;

cout<<"\t,8 8888       `8b  8 8888      88  8 8888        ,8',8888'             ,8 8888       `8.     :88888.               .`8888.   .`8888.        8 8888         "<<endl;

cout<<"\t88 8888        `8b 8 8888      88  8 8888       ,8',8888'              88 8888              . `88888.             ,8.`8888. ,8.`8888.       8 8888         "<<endl;

cout<<"\t88 8888         88 8 8888      88  8 8888      ,8',8888'               88 8888             .8. `88888.           ,8'8.`8888,8^8.`8888.      8 888888888888 "<<endl;

cout<<"\t88 8888     `8. 88 8 8888      88  8 8888     ,8',8888'                88 8888            .8`8. `88888.         ,8' `8.`8888' `8.`8888.     8 8888         "<<endl;

cout<<"\t88 8888      `8,8P 8 8888      88  8 8888    ,8',8888'                 88 8888   8888888 .8' `8. `88888.       ,8'   `8.`88'   `8.`8888.    8 8888         "<<endl;

cout<<"\t`8 8888       ;8P  ` 8888     ,8P  8 8888   ,8',8888'                  `8 8888       .8'.8'   `8. `88888.     ,8'     `8.`'     `8.`8888.   8 8888         "<<endl;

cout<<"\t ` 8888     ,88'8.   8888   ,d8P   8 8888  ,8',8888'                      8888     ,88'.888888888. `88888.   ,8'       `8        `8.`8888.  8 8888         "<<endl;

cout<<"\t    `8888888P'  `8.   `Y88888P'    8 8888 ,8',8888888888888                `8888888P' .8'       `8. `88888. ,8'         `         `8.`8888. 8 888888888888 "<<endl;

                                                                                                                                                           

 HANDLE f = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(f,FOREGROUND_RED | FOREGROUND_INTENSITY);

for(int i=0; i<80; i++) {

cout <<"\xDB";

 }

 

 

  HANDLE fl = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(fl,FOREGROUND_GREEN | FOREGROUND_INTENSITY);



HANDLE fg = GetStdHandle(STD_OUTPUT_HANDLE);

SetConsoleTextAttribute(fg,FOREGROUND_RED | FOREGROUND_INTENSITY);


for(int i=0; i<80; i++) {

cout <<"\xDB";

 }

 


}

int main()

{

    menu();

    color();

string choice;int c=0;

string name;

system("cls");

menu:

    menu();

    

cout<<"\n\n\t\t\t\t\tMAIN MENU"<<endl;

cout<<endl;

cout<<"\t\t\t\tS==> for start game <=="<<endl;

cout<<"\t\t\t\tH==> for Help <=="<<endl;

cout<<"\t\t\t\tQ==> for Quit <=="<<endl;

cout<<endl;

cout<<"\t\t\t\tenter choice:";

cin>>choice;

if(choice=="s"|| choice=="S")

{

system("cls");

menu();

cout<<"\n\n\t\t======>>>\tFirst you have to pass the entry test to enter in the Quiz game. "<<endl;

cout<<"\n\n\t\t======>>>\tEntery test include a simple multiple choice question.  "<<endl;

cout<<"\n\n\t\t======>>>\tIf your answer to the question is correct then you can play the game. "<<endl;

cout<<"\n\n\t\t======>>>\tOtherwise you are not eligible to play the the game. "<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<endl;

cout<<"enter your name"<<endl;

cin>>name;

system("pause");

system("cls");

menu();

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<endl;

cout<<"\n\n\n\t\t\t\t\t\tEntry Test"<<endl;

cout<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\t\t\t\t\tWhich is the largest river in the world"<<endl;

cout<<endl;

cout<<"\t\t\t\t\t(A) Chanab\t(B) Hudson\n\n\t\t\t\t\t(C) Neil\t(D) Ganga"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")//working if

{

cout<<"\t\t==>Correct"<<endl;

cout<<endl;

cout<<endl;

cout<<"\t\t\tCongratulations! You have PASSED the entery test\a"<<endl;

cout<<"\t\t\tNow Enter any key to start QUIZ GAME:";

system("pause");

system("cls");

menu();

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\tStarting LEVEL:1"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\t(BIGINNER)"<<endl;

cout<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

Sleep(2000);

system("cls");

menu();

cout<<"\n\n\t\t\t\t\tLEVEL:1(BIGINNER)"<<endl;//start of quiz

cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:1"<<endl;

cout<<endl;

cout<<"\t\t\tWhat is the national game of England?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Football\t(B) Cricket\n\n\t\t\t(C) Badminton\t(D) Hockey"<<endl;

cin>>choice;

if(choice=="b"||choice=="B")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (B) Cricket.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    system("cls");

    menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:1(BIGINNER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:2"<<endl;

cout<<endl;

cout<<"\t\t\tWhich acid is called the KING of Acids?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Hydrochloric Acid\t(B) Nitric Acid\n\n\t\t\t(C) Sulfuric Acid\t(D) Tartaric Acid"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (C) Sulphuric Acid.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    system("cls");

    menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:1(BIGINNER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:3"<<endl;

cout<<endl;

cout<<"\t\t\tWhen is the Christmas celebrated?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) 11th feburary\t(B) 25th January\n\n\t\t\t(C) 25th November\t(D) 25th December"<<endl;

cin>>choice;

if(choice=="d"||choice=="D")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (D) 25th December.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:1(BIGINNER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:4"<<endl;

cout<<endl;

cout<<"\t\t\tThe biggest mountain 'Mount Everest' is located in?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Brazil\t(B) Pakistan\n\n\t\t\t(C) Nepal\t(D) China"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (c) Nepal.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:1(BEGINNER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:5"<<endl;

cout<<endl;

cout<<"\t\t\tWhen was the Pakistan Resolution passed?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) 1940\t(B) 1919\n\n\t\t\t(C) 1947\t(D) 1914"<<endl;

cin>>choice;

if(choice=="a"||choice=="A")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (A) 1940.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    system("cls");

    menu();

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<"\n\n\n\n\n\n\t\t\t\t\tCONGRATULATIONS! You have passed LEVEL:1(BIGINNER)\a"<<endl;

    cout<<"\n\n\n\n\t\t\t\t\tYou have been promoted to Level:2(AMATUER)"<<endl;

    cout<<endl;

    cout<<name<<" your Total Score is="<<c<<endl;

    cout<<endl;

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<endl;

    cout<<"\n\t\t\t\t\tENTER any key to Start next LEVEL:"<<endl;

    system("pause");

    system("cls");

    menu();

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\tStarting LEVEL:2"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\t(AMATUER)"<<endl;

cout<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

Sleep(2000);

system("cls");

menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:2(AMATUER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:1"<<endl;

cout<<endl;

cout<<"\t\t\tWhen the Pakistan became Islamic Republic?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) March 23, 1940\t(B) March 23, 1919\n\n\t\t\t(C) March 23, 1947\t(D) March 23, 1956"<<endl;

cin>>choice;

if(choice=="d"||choice=="D")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (A) March 23, 1956.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    system("cls");

    menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:2(AMATUER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:2"<<endl;

cout<<endl;

cout<<"\t\t\tIn Pakistan, The highest military award is?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Tamga-e-Jurrat\t(B) Nishan-e-Haider\n\n\t\t\t(C) Sitara-e-Jurrat\t(D) Nobel award"<<endl;

cin>>choice;

if(choice=="b"||choice=="B")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (B) Nishan-e-Haider.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    system("cls");

    menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:2(AMATUER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:3"<<endl;

cout<<endl;

cout<<"\t\t\tWhich is the smallest Muslim state in the world?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Iraq\t(B) Egypt\n\n\t\t\t(C) Maldives\t(D) Oman"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (C) Maldives.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    system("cls");

    menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:2(AMATUER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:4"<<endl;

cout<<endl;

cout<<"\t\t\tWhich is the largest continent in the world?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) North America\t(B) Asia\n\n\t\t\t(C) Africa\t\t(D) Europe"<<endl;

cin>>choice;

if(choice=="b"||choice=="B")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (B) Asia.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    system("cls");

    menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:2(AMATUER)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:5"<<endl;

cout<<endl;

cout<<"\t\t\tWho was the first Mughal Empire?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Himayun\t(B) Akbar\n\n\t\t\t(C) Jahangir\t(D) Baber"<<endl;

cin>>choice;

if(choice=="d"||choice=="D")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (D) Baber.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<"\n\n\n\n\n\n\t\t\t\t\tCONGRATULATIONS again! You have passed LEVEL:2(AMATUER)\a"<<endl;

    cout<<"\n\n\n\n\t\t\t\t\tYou have been promoted to Level:3(PRO)"<<endl;

    cout<<endl;

    cout<<name<<" your Total Score is="<<c<<endl;

    cout<<endl;

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<endl;

    cout<<"\n\t\t\t\t\tENTER any key to Start next LEVEL:"<<endl;

    system("pause");

    system("cls");

    menu();

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\tStarting LEVEL:3"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\t(PRO)"<<endl;

cout<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

Sleep(2000);

system("cls");

menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:3(PRO)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:1"<<endl;

cout<<endl;

cout<<"\t\t\tIn which province of Pakistan maximum languages are spoken?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Punjab\t(B) Balochistan\n\n\t\t\t(C) Sindh\t(D) KPK"<<endl;

cin>>choice;

if(choice=="b"||choice=="B")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (B) Balochistan.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:3(PRO)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:2"<<endl;

cout<<endl;

cout<<"\t\t\tWhich Urdu has been taken from the following languages?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Greek\t(B) Persia\n\n\t\t\t(C) Turkish\t(D) Arabic"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (C) Turkish.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:3(PRO)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:3"<<endl;

cout<<endl;

cout<<"\t\t\tWhich language is used in first generation computers?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Machine language\t(B) Assembly language\n\n\t\t\t(C) Pascal language\t(D) C++ language"<<endl;

cin>>choice;

if(choice=="a"||choice=="A")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (A) Machine language.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:3(PRO)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:4"<<endl;

cout<<endl;

cout<<"\t\t\tThe heart of normal adult human being weighs about:"<<endl;

cout<<endl;

cout<<"\t\t\t(A) 100 grams\t(B) 200 grams\n\n\t\t\t(C) 300 grams\t(D) 400 grams"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (C) 300 grams.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:3(PRO)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:5"<<endl;

cout<<endl;

cout<<"\t\t\tWhere is the world longest sea bridge?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) India\t(B) America\n\n\t\t\t(C) France\t(D) China"<<endl;

cin>>choice;

if(choice=="d"||choice=="D")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (D) China.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<"\n\n\n\n\n\n\t\t\t\t\tCONGRATULATIONS! You have passed LEVEL:3(PRO) comprehensively.\a"<<endl;

    cout<<"\n\n\n\n\t\t\t\t\tYou have been promoted to Level:4(EXPERT)"<<endl;

    cout<<endl;

    cout<<name<<" your Total Score is="<<c<<endl;

    cout<<endl;

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<endl;

    cout<<"\n\t\t\t\t\tENTER any key to Start next LEVEL:"<<endl;

    system("pause");

    system("cls");

    menu();

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\tStarting LEVEL:4"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\t(EXPERT)"<<endl;

cout<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

Sleep(2000);

system("cls");

menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:4(EXPERT)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:1"<<endl;

cout<<endl;

cout<<"\t\t\tFirst generation computers were developed during:"<<endl;

cout<<endl;

cout<<"\t\t\t(A) 1935-1940\t(B) 1940-1956\n\n\t\t\t(C) 1955-1960\t(D) 1970-1974"<<endl;

cin>>choice;

if(choice=="b"||choice=="B")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (B) 1940-1956.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:4(EXPERT)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:2"<<endl;

cout<<endl;

cout<<"\t\t\tWhich is the world oldest university?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Fez Morocco\t(B) Harvard university\n\n\t\t\t(C) Oxford university\t(D) Cairo university"<<endl;

cin>>choice;

if(choice=="a"||choice=="A")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (A) Fez Morocco.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:4(EXPERT)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:3"<<endl;

cout<<endl;

cout<<"\t\t\tWhich was the first country to leave the UN?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) India\t(B) Iran\n\n\t\t\t(C) North Korea\t(D) Indonesia"<<endl;

cin>>choice;

if(choice=="d"||choice=="D")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (D) Indonesia.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:4(EXPERT)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:4"<<endl;

cout<<endl;

cout<<"\t\t\tThe last Hindu ruler of the sub-continent was:"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Raja Dahir\t(B) Bheem Singh\n\n\t\t\t(C) Raja Pirthavi Raj\t(D) Raja Jay Chand"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (C) Raja Pirthavi Raj.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:4(EXPERT)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:5"<<endl;

cout<<endl;

cout<<"\t\t\tWho destroyed the temple of Somnat?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Mehmood Ghaznavi\t(B) Ghuari\n\n\t\t\t(C) Ibrahim Lodhi\t(D) Bhadar Shah Zafar"<<endl;

cin>>choice;

if(choice=="a"||choice=="A")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (A) Mehmood Ghaznavi.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<"\n\n\n\n\n\n\t\t\t\t\tCONGRATULATIONS Dude! You have passed LEVEL:4(EXPERT) Wisely\a"<<endl;

    cout<<"\n\n\n\n\t\t\t\t\t Now you have been promoted to Level:5(GENIUS) Best of Luck!"<<endl;

    cout<<endl;

    cout<<name<<" your Total Score is="<<c<<endl;

    cout<<endl;

    cout<<"________________________________________________________________________________________________________________________"<<endl;

    cout<<endl;

    cout<<"\n\t\t\t\t\tENTER any key to Start next LEVEL:"<<endl;

    system("pause");

    system("cls");

    menu();

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\tStarting LEVEL:5"<<endl;

cout<<"\n\n\n\n\t\t\t\t\t\t(GENIUS)"<<endl;

cout<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

Sleep(2000);

system("cls");

menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:5(GENIUS)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:1"<<endl;

cout<<endl;

cout<<"\t\t\tthe longest Lunar Eclipse of 21st century was occured on:"<<endl;

cout<<endl;

cout<<"\t\t\t(A) 26th march 2018\t(B) 25th may 2018\n\n\t\t\t(C) 27th july 2018\t(D) 19th june 2018"<<endl;

cin>>choice;

if(choice=="c"||choice=="C")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (C) 27th july 2018.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:5(GENIUS)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:2"<<endl;

cout<<endl;

cout<<"\t\t\tPenalty Cards(Yellow,Red) used in football first introduced in which year?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) 1930 (Uruguay)\t(B) 1970 (Mexico)\n\n\t\t\t(C) 1938 (France)\t(D) 1978 (Argentina)"<<endl;

cin>>choice;

if(choice=="b"||choice=="B")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (B) 1970 (Mexico).\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:5(GENIUS)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:3"<<endl;

cout<<endl;

cout<<"\t\t\tThe deepest point in the world is:"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Dead sea\t(B) Mariana Trench\n\n\t\t\t(C) Black sea\t(D) South pole"<<endl;

cin>>choice;

if(choice=="b"||choice=="B")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (B) Mariana Trench.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:5(GENIUS)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tQuestion:4"<<endl;

cout<<endl;

cout<<"\t\t\tWhich city is also called the city of 1000 minarets?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) Cairo\t(B) Makkah\n\n\t\t\t(C) Istambul\t(D) Denmark"<<endl;

cin>>choice;

if(choice=="a"||choice=="A")

{

cout<<"\t\t\t==>Correct!"<<endl;

c=c+100;

Sleep(1000);

    }

else

{

cout<<"\t\t\tWrong! The answer is (A) Cairo.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

     system("cls");

     menu();

    cout<<"\n\n\t\t\t\t\tLEVEL:5(GENIUS)"<<endl;

    cout<<"\t\t_______________________________________________________\t\t"<<endl;

cout<<endl;

cout<<"\t\t\t\t\tFinal Question of the Final Round:"<<endl;

cout<<endl;

cout<<"\t\t\tWhen and who used the first iron-cased Rockets in Anglo-Mysore Wars?"<<endl;

cout<<endl;

cout<<"\t\t\t(A) 1578 by Baber\t(B) 1782 by Tipu Sultan\n\n\t\t\t(C) 1303 by Alauddin Khalji\t(D) 1792 by Tipu Sultan"<<endl;

cin>>choice;

if(choice=="d"||choice=="D")

{

cout<<"\t\t\t==>Correct!"<<endl;

cout<<"\t\t\t(GAME ENDED)"<<endl;

cout<<"\t\t\t==>Exellent! Well played! Absolute Genius!\a "<<endl;

cout<<"\t\t\t==>You performed very well really a genius mind you have. "<<endl;

c=c+100;

cout<<"\n\n\t\t\tHere is your record "<<name<< " Your Total Score="<<c<<endl;

Sleep(1000);

cout<<"\t\t\t\t\tENTER any key to go to MAIN MENU"<<endl;

cin>>choice;

system("cls");

goto menu;

    }

else

{

cout<<"\t\t\tWrong! The answer is (D) 1792 by Tipu Sultan.\a"<<endl;

cout<<"\t\t\t(GAME is OVER)"<<endl;

cout<<"\t\t\twell played! ."<<endl;

cout<<"\n\n\t\t\t"<<name<< " Your Total Score="<<c<<endl;

cout<<"ENTER any key to goto MAIN MENU"<<endl;

system("pause");

system("cls");

goto menu;

Sleep(1000);

    }

    }

    else

{

    cout<<"\t\t\tWrong! The correct answer is (C) Neil."<<endl;

    cout<<endl;

    cout<<"\t\t\tSorry! You are not eligible to play the game."<<endl;

    cout<<"\n\n\t\tENTER any key to go back to MAIN MENU:";

    system("pause");

    system("cls");

    goto menu;

    }

}

else if(choice=="h"||choice=="H")

{

system("cls");

menu();

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\t\t\t\t\t\tHELP and GUIDE"<<endl;

cout<<endl;

cout<<"________________________________________________________________________________________________________________________"<<endl;

cout<<"\n\n\n\t\t\tThis is a QUIZ GAME which have five levels as given below. "<<endl;

cout<<"\t\t\tLEVEL:1(BIGINNER)  "<<endl;

cout<<"\t\t\tLEVEL:2(AMATUER)  "<<endl;

cout<<"\t\t\tLEVEL:3(PRO)  "<<endl;

cout<<"\t\t\tLEVEL:4(EXPERT)  "<<endl;

cout<<"\t\t\tLEVEL:5(GENIUS)  "<<endl;

cout<<"\t\t\tEach level has five GK questions with each question having  "<<endl;

cout<<"\t\t\tfour options like (A) (B) (C) (D).You have to choose the  "<<endl;

cout<<"\t\t\twrite option and enter it.If your option is write then you  "<<endl;

cout<<"\t\t\twill go to the next question.If your option is wrong then   "<<endl;

cout<<"\t\t\tthe game will over with displaying the write answer of the   "<<endl;

cout<<"\t\t\tquestion.Moreover, The questions become difficult as the   "<<endl;

cout<<"\t\t\tlevel increases.  "<<endl;

cout<<"\t\t\tEach question score=100.   "<<endl;

cout<<"\n\n\n\t\t\tENTER any key to go back to the MAIN MENU: "<<endl;

system("pause");

system("cls");

goto menu;

}

else if(choice=="q"||choice=="Q")

cout<<"GAME has been quit"<<endl;

else

{

cout<<"\n\n\tinvalid choice! Please enter a valid choice: "<<endl;

Sleep(1000);

system("cls");

    goto menu;

    }

}


Comments

Popular posts from this blog

Requirements Elicitation Techniques