Code:

#include <iostream> 

#include<stdio.h>

#include <string>

#include<conio.h>

#include<windows.h>

#include<fstream>

using namespace std;

int n=1;


int total=0;

class Question{

char ans;

char nans;

int highs;

public:

int score=0;

//Question()

//{total=0;

// score=0;

//}

Question()

{int a;

ifstream fout("score.txt");

fout>>a;

highs=a;

fout.close();

}

void hscore()

{cout<<"HIGH SCORE : "<<highs;

}

void setValues(string a,string b,string c,string d,string e,char f,int g){

CC:

cout<<"\n\n\t\tQuestions:"<<n<<"/N"<<endl;

cout<<"\n\n\n\n\n\n\n\t"<<a<<endl;

cout<<"\n\n\t a) "<<b<<endl;

cout<<"\t b) "<<c<<endl;

cout<<"\t c) "<<d<<endl;

cout<<"\t d) "<<e<<endl;

cout<<"\n\n\n\t\tChose the right option '___' : ";

ans=getch();

if(ans>100||ans<97)

{rkey();

goto CC;

}

if(ans==f)

{

score=score +g;

correct();

}

else

ncorrect();

}

void set(string a,string b,string c,string d,char f,int g, int h, int i){

CC:

system("cls");

cout<<"\n\n\t\tQuestions:"<<n<<"/N"<<endl;

cout<<"\n\n\n\n\n\n\n\t"<<a<<endl;

cout<<"\n\n\t a) "<<b<<endl;

cout<<"\t b) "<<c<<endl;

cout<<"\t c) "<<d<<endl;

cout<<"\n\n\n\t\tChose the right option '___' : ";

ans=getch();

if(ans>100||ans<97)

{rkey();

goto CC;

}

n++;

if(ans=='a')

{

score=score +g;

}

if(ans=='b')

{

score=score +h;

}

if(ans=='c')

{

score=score +i;

}

}

void sset(string a,string b,string c,char f,int g){

CC:

cout<<"\n\n\t\tQuestions:"<<n<<"/N"<<endl;

cout<<"\n\n\n\n\n\n\n\t"<<a<<endl;

cout<<"\n\n\t a) "<<b<<endl;

cout<<"\t b) "<<c<<endl;

cout<<"\n\n\n\t\tChose the right option '___' : ";

ans=getch();

if(ans>100||ans<97)

{rkey();

goto CC;

}

if(ans==f)

{

score=score +g;

correct();

}

else

ncorrect();

}

void rkey(){

system("COLOR 4f");

cout<<"\n\n\n\n\t\t\tPLEASE! PRESS THE RIGHT KEY......\a";

Sleep(100);

system("color 0f");

system("cls");

}

void ncorrect(){

n++;

system("COLOR 4f");

cout<<"\n\n\n\n\t\t\tSORRY YOU CHOOSE THE WRONG OPTION......\a";

Sleep(1000);

system("color 0f");

system("cls");

}

void correct(){

n++;

system("COLOR 2F");

cout<<"\n\n\n\n\t\t\tYOU CHOSE THE RIGHT OPTION......\a";

Sleep(1000);

system("color 0f");

system("cls");

}

void load(){

system("cls");

system("color 65");

cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t   ***LOADING***"<<endl;

cout<<"\t\t\t";

char ascii=177;

int i=0;

for(i=0; i<35; i++)

{

cout<<ascii;

Sleep(300);

}

system("color 0f");

}

void queload(){

system("cls");

system("color f4");

cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t***LOADING***"<<endl;

cout<<"\t\t\t";

char ascii=177;

int i=0;

for(i=0; i<35; i++)

{

cout<<ascii;

Sleep(50);

}

system("color 0f");

}

void pass(){

system("cls");

system("color 2f");

cout<<"\n\n\n\n\n\n\t\tCONGRAJULATIONS! YOU PASS THE QUIZZ."<<endl;

cout<<"\n\t\t\tYour Total Score Is:"<<score;

if(highs<=score)

{

ofstream fin("score.txt");

fin<<highs;

fin.close();

}

Sleep(3000);

system("color 0f");

}

void fail(){

system("cls");

system("color 4f");

cout<<"\n\n\n\n\n\n\n\t\tSORRY! YOU FAIL THE QUIZ."<<endl;

cout<<"\n\t\t\tYour Total Score Is:"<<score;

            if(highs<=score)

{

ofstream fin("score.txt");

fin<<highs;

fin.close();

}

Sleep(3000);

system("color 0f");

}

};

class subfun:public Question{

public:

void cpp()

{system("cls"); 

Question q1,q2,q3,q4,q5,q6,q7,q8,q9,q10;

  

    q1.setValues("1. What command prints something to the screen?","cin","cout","char","print",'b',4);


    q2.setValues("2. Which of the following categories does C++ belong to?","Operating System","High-level programming language","low-level programming language","Compiler",'b',4);


    q3.setValues("3. Which command is correctly written?","cout >>","cin <<","cout <>","cin >>",'d',4);


    q4.setValues("4. What is this called, <iostream>?","directive","pre-processor directive","file","command",'b',4);


    q5.setValues("5. What punctuation ends most lines of code?"," . "," ; "," : "," ' ",'b',4);


    q6.setValues("6. Which of the following is a correct comment?","*/ Comments */","** Comment **","/* Comment */","{ Comment }",'c',4);


    q7.setValues("7. Which of the following is the boolean operator for logical-and?","&","|","&&","|&",'c',4);


    q8.setValues("8. Which of the following shows the correct syntax for an if statement?","if expression","if {expression","if (expression)","expression if",'c',4);


    q9.setValues("9. How many times is a do while loop guaranteed to loop?","1","0","Infinitely","Variable",'a',4);


    q10.setValues("10. A subscipt is a(n) __________ .","element in an array","alternate name for an array","number that represents the highest value stored within an array","number that indicates the position of the particular item in an array",'d',4);


   system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void technology(){

system("cls");

    Question q11, q12, q13, q14, q15, q16, q17, q18, q19, q20;

    q11.setValues("1. Which of these is not a kind of Computer?","Lada","Toshiba","Apple","Lenovo",'a',4);

q12.setValues("2. What is the relationship between resistivity r and conductivity s?","R = s2","R = s","R>s","R = 1/s",'d',4);

q13.setValues("3. Who founded Apple Computer?","Stephen Hawking","Stephen Fry","Steve Jobs","Bill Gates",'c',4);

q14.setValues("4. What is the name for a device computer pointing device?","a sound card"," a monitor","a mouse","a modem",'a',4);

q15.setValues("5. What does the Internet prefix WWW stand for?","Wide Width Wickets","Westren Washington World","World Wide Weather","World Wide Web",'d',4);

q16.setValues("6. What is part of a database that holds only one type of information?","Report","Feild","Record","File",'b',4);

q17.setValues("7. 'MOV' extion refers usually to what kind of file?","Image file","Animation/movie file","Audio file","MS Office document",'b',4);

q18.setValues("8. Most modern TV's draw power if turned off. The circuit the power is used in does what function?","Sound","Remote controle","Color balance","High voltage",'b',4);

q19.setValues("9. Which is aa type of Electrically-Erasable Programmable Read-Only Memory?","Flash","Flange","Fury","FRAM",'a',4);

q20.setValues("10. 'DB' computer abbreviation usually means?","Database","Double byte","Data Block","Driver Boot",'a',4);

system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void ss(){system("cls");

Question q21, q22, q23, q24,q25, q26, q27, q28 ,q29, q30;

q21.setValues("1. Which planet has a moon called 'Triton'?","Uranus","Earth","Neptune","Pluto",'c',4);

q22.setValues("2. Which planet has the largest set of rings?","Saturn"," Jupiter"," Mercury ","Pluto",'a',4);

q23.setValues("3. Which of the planets, other than Earth, has an atmosphere and seasons?","Uranus","Venus","Mars","Saturn",'c',4);

q24.setValues("4. Which planet's year is almost 84 Earth years long?","Uranus","Saturn","Neptune","Venus",'a',4);

q25.setValues("5. Which statement describes the atmosphere of the planet correctly? ","Venus is mostly carbon dioxide","Mercury is mostly nitrogen","Earth is mostly oxygen","Saturn is mostly helium",'d',4);

q26.setValues("6. How long does it take for light from the Sun to reach Earth?","1 minute","8 minutes","Instantaneous","24 hours",'d',4);

q27.setValues("7. It takes the Sun 225-250 million years to do one revolution of the Milky Way Galaxy. How fast does the Sun travel?","220km in a second","220km in an minute","220 km in a hour","220km in a year",'d',4);

q28.setValues("8. How old is the solar system?","5000 years","5 million years","5 billion years","500 billion years",'d',4);

q29.setValues("9. In 2007, Voyager 2 crossed the heliosheath boundary and into the vast region at the edge of our solar system where the solar wind runs up against the thin gas between the stars. What did this crossing confirm about the shape of our solar system?","It’s squashed","It’s round","It’s like a donut","It’s a horseshoe shape.",'d',4);

q30.setValues("10. Which planet is the largest in our solar system?","Earth","Venus","Jupiter","Mars",'d',4);

   system("cls");

   system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void worldh(){

system("cls"); 

Question q31;

    Question q32;

    Question q33;

    Question q34;

    Question q35;

    Question q36;

    Question q37;

    Question q38;

    Question q39;

    Question q40;

  

    q31.setValues("1. Adolf Hitler was born in wich country?","France","Germany","Austria","Hungary",'c',4);


    q32.setValues("2. The first successful printing press was developed by this man.","Johannes","Benjamin Franklin","Sir Isaac Newton","Martin Luther",'a',4);


    q33.setValues("3. The disease that ravaged and killed a third of Europe's Population in the 14th century is known as'","The White Death","The Black Plague","Smallpox","The Bubonic Plague",'d',4);


    q34.setValues("4. The Hundred Years War was fought between what two countries?","Italy and carthage","England and Germany","Spain and France","France and England",'d',4);


    q35.setValues("5. Who was the first Western explorer to reach China?","Magellan","Cook","Marco Polo","Six Francis Drake",'c',4);


    q36.setValues("6. Islam came in wich century?","End of 6th century","Start of 7th Century","End of 7th century","Middle of 7yh century",'b',4);


    q37.setValues("7. Which date is correct about Atomic bombings of Hiroshima and Nagasaki?","Stember 9 and stember 6, 1945","August 6 and August 9, 1946","August 9 and August 6,1945","August 6 and August 9, 1945",'d',4);


    q38.setValues("8. Mountbatten on 3 June 1947 announced the date of independence of India. What is the date when India is divided?","14 august, 1948","14 august, 1947","15 august, 1947","15 august, 1948",'c',4);


    q39.setValues("9. The Stember 11, 2001 attacks on World Trade Center is known as?","11/12","9/11","10/11","World Trade Center bombing",'b',4);


    q40.setValues("10. the Father of Computer Charles Babbage(1791-1871) invented the Analytical Engine in?","1821","1832","1856","1857",'c',4);

   system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;


}

void islamb(){

system("cls"); 

Question q41;

    Question q42;

    Question q43;

    Question q44;

    Question q45;

    Question q46;

    Question q47;

    Question q48;

    Question q49;

    Question q50;

  

    q41.setValues("1. Prophet Muhammad(PBUH) was born into the noble tribe of Quraysh in Makkah in?","571 CE","610 CE","630 CE","632 CE",'a',4);


    q42.setValues("2. Which is the correct etiquette of Imam to deliver Friday Khutba?","He can face toward Qiblah and deliver Khutba","He must face the audience and deliver Khutba","He is at liberty to face the Qiblah or audience","All of the above",'b',4);


    q43.setValues("3. There is only one companion that has been mentioned by name in the Quran. Who was he?","Zayd ibn Harithah, Radi-Allahu anhu","Zayd ibn Thabit, Radi-Allahu anhu","Ali ibn Talib, Radi-Allahu anhu","Abdullah ibn Umar, Radi-Allahu anhu",'a',4);


    q44.setValues("4. Which of the following translated the Quran in Urdu for the first time?","Shah Rafiudin","Baihaqi","Shah Hamid-ud-din","Shah Waliullah",'a',4);


    q45.setValues("5. The spiritual head of all Muslims is called?","General","Caliph","Leader","None of these",'b',4);


    q46.setValues("6. Which Kalimah is recited after the Wuzu?","Kalimah-e-Tauheed","Kalimah-e-Tauba","Kalimah-e-Astaghfar","Kalimah-e-Shahadat",'d',4);


    q47.setValues("7. The first Hajj was performed in?","9 AH","10 AH","8 AH","11 AH",'a',4);


    q48.setValues("8. Two angels who are appointed on each person are known as?","Hazrat Izraeel(AS) and Hazrat Mikael(AS)","kiraman Kitabeen","Munkar & Nakeer","Hazrat Izraeel(AS) Hazrat Israfeel(AS)",'b',4);


    q49.setValues("9. The stone mentioned in the Holy Quran is..?","Copper","Gold","Silver","Ruby",'d',4);


    q50.setValues("10. Surah _________ does not start with Bismillah.","AL-Fatiha","AL-Teen","AL-Alaq","AL-Tauba",'d',4);

system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void result()

{system("cls");

if(score>=20)

   {

    Sleep(1000);

    cout<<"\n\n\n\t\t\tsmall";

   }

   if(score>=40)

   {

    Sleep(1000);

    cout<<"\n\n\n\t\t\tAverage";

   }

   if(score>=60)

   {

    Sleep(1000);

    cout<<"\n\n\n\t\t\tHigh";

   }

   cout<<"\n\t\t\t"<<score;

   getch();

}

void addione(){

system("cls");

Question q51,q52,q53,q54,q55,q56,q57,q58,q59,q60;

q51.setValues("1. You are doing something by yourself, and you hear\n your cell phone ringing. It is not in the same room as you.\n What do you do?","Depends if I'm in the mood to take calls/texts.","Check it later when you are done doing what you are doing.","Run to the other room to check it.","I don't have a cell phone ",'a',4);

        q52.setValues("2. You find a vacation that you like where your cell phone will not get signal.\n Would you go?","It doesn't matter because I don't have a cell phone.","No! I can't live without it.","I would definitely go! I would be happy to take a break from my phone.","I would go, but I would be unhappy about it.",'a',4);

        q53.setValues("3. You get a new job.\n On the first day you find out that you aren't allowed to have your cell phone in the work building.\n What do you do?","No big deal, I'll just leave it in the car or home.","Just sneak my phone into work on vibrate/silent","Quit the job! that is a ridiculous rule!","I dont have a cell phone so it dosen't matter",'a',4);

        q54.setValues("4. Where is your cell phone right now?","Right near me, I can touch it without having to go anywhere.","Oops, I forgot, I left it in the car","I dont have a cell phone","I dont know",'a',4);

        q55.setValues("5. Do you text messeges?","I think I am going to have to get unlimited before I go broke.","Do I what?","How many times do I have to say I dont have a cell phone","Yes, I have an unlimited plan.",'a',4);

q56.setValues("6. What do you have your cell phone for?","I dont have a cell phone!","Only for emergencies/for work","just calling and texting, that's all","Everything!",'a',4);

        q57.setValues("7. Dou you download ringtones on your phone?","Wait, you can download ringtones on your phone?","I dont have a cell phone!","No, I only use the ringtones my phone came with.","Yes, I have like, a lot.",'a',4);

        q58.setValues("8. Do you keep your phone near you when you are sleeping?","Yes, you never know, I may get a\n text or call in the middle of the\n night and/or I may wake up in the middle of the night\n and want to check the time on the clock","Only if I'm using the alarm clock that night.","No","I dont have a cell phone!",'a',4);

q59.setValues("9. Do you rely on your cell phone to check the time?","Yes, vey often","Sometimes","No","I dont have a cell phone",'a',4);

q60.setValues("10. You either have to live a week without your cell phone, or\n get a very painful shot at the doctor.What do you do?","Live without the cell phone.","Get the painful shot.","I dont have a cell phone","fell unhappy",'a',4);

   system("cls");

   queload();

  result();

   score=0;

   n=1;


}

void additwo()

{system("cls");

score=0;

Question q61, q62, q63, q64, q65, q66, q67, q68, q69, q70;

q61.set("1. How long do you spend on a computer a day?", "1 hour or less","1-2 hours","3 plus hours",'a',2,4,8);

        q62.set("2. How many tests have you taken today on internet?","7 plus","1-3","4-6",'a',2,4,8);

q63.set("3. How many quizzes do you plan on taking?","This is the only one","Until my fingers bleed frome clicking the mouse so much","one more",'a',2,4,8);

q64.set("4. Do parents or a spouse often have to tell you to get off the computer?","Yes","No","Sometimes",'a',2,4,8);

    q65.set("5. Do you cheat on tests just to make yourself look good?","Yes","if I had a bad day","No I'm comfortable with myself",'a',2,4,8);

q66.set("6. In your favorites folder do you find several websites for quizzes and tests?","Yes all of them","only a few","None",'a',2,4,8);

q67.set("7. Have you ever been in trouble at school because you go caught taking quizzes during class time?","Yes several times","Only once","No..I have better things to do",'a',2,4,8);

      q68.set("8. On weekends are you usually home alone because your friends are out having fun \nand you're at home taking quizzes? ","All the time","Occasionally when there is a good test to take","No way",'a',2,4,8);

    q69.set("9. When you're going home frome work/school do you get excited to get\n on the computer and take new quizzes or tests?","Yes, I'm already excited for the one i'll take next","Sometimes","No that's stupid'",'a',2,4,8);

    q70.set("10. Did you find this quiz to be boring compared to others you have taken?","Nah it's alright","it's kind of lame","it was very low class",'a',2,4,8);

   system("cls");

   queload();

 result();

   score=0;

   n=1;

}

void addithree()

{system("cls");

Question q71, q72, q73, q74, q75, q76, q77, q78, q79, q80, q81;

q71.sset("1. You have more than 10 games?","Yes","No",'a',4);

q72.sset("2. You have more than 30 games","Yes","No",'a',4);

q73.sset("3. You own a Gameboy color?","Yes","No",'a',4);

q74.sset("4. You play for over 2 hours.","Yes","No",'a',4);

q75.sset("5. You own a Nintendo 64.","Yes","No",'a',4);

q76.sset("6. You own a playstation?","Yes","No",'a',4);

q77.sset("7. You own an X box.","Yes","No",'a',4);

q78.sset("8. You own a PSP.","Yes","No",'a',4);

q79.sset("9. You never leave the house without your hand held games?","Yes","No",'a',4);

q80.sset("10. You got in trouble for playing to much video games.","Yes","No",'a',4);

q81.sset("11. You can't live without video games.","Yes","No",'a',4);

   system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void addifour()

{system("cls");

Question qu, q82, q83, q84, q85, q86, q87, q88, q89, q90, q91, q92, q93, q94;

qu.sset("1. Do you own a computer or have one in your house?","Yes","No",'a',4);

q82.sset("2. Do you chat online over 4 hours per day?","Yes","No",'a',4);

q83.sset("3. Do you chat online more than 7 hours per day?","Yes","No",'a',4);

q83.sset("4. Do you get pissed when your internet connection is interrupted?","Yes","No",'a',4);

q84.sset("5. Do you eat at the computer often?","Yes","No",'a',4);

q85.sset("6. Do you play computer games more than 4 hours per day?","Yes","No",'a',4);

q86.sset("7. Do you often stay up all night to be online?","Yes","No",'a',4);

q87.sset("8. Do you get online in the morning?","Yes","No",'a',4);

q88.sset("9.Do you know what a router is? ","Yes","No",'a',4);

q89.sset("10. Do you ever skip meals and stay hungry just do continue doing what you were doing?","Yes","No",'a',4);

q90.sset("11. Are you online 7 days a week?","Yes","No",'a',4);

q91.sset("12. Are you online more than 18 hours a day?","Yes","No",'a',4);

q92.sset("13. Do you know what c++ is?","Yes","No",'a',4);

q93.sset("14. Do you imagine yourself meeting your wife/husband on the internet?","Yes","No",'a',4);

q94.sset("15. Do you lie about your age while talking to new people?","Yes","No",'a',4);

   system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void deathone()

{system("cls");

  Question q95, q96, q97, q98, q99, q100, q101, q102, q103, q104, q105;

q95.set("1. There is a knock on the door. You open the door and there is a man with knife.\n Heswings the knife and misses the  knife gets stuck in the wall...What do you do?","Punch the man.","Run for the back door.","Run into a room and hide.",'a',2,4,8);

q96.set("2. You run for the back door. You open the back door and another killer is there waiting for you.\n You shut the door and you....What do you do?","Run and find a weapon","Fight the man outside.","Run in a room and hide.",'a',2,4,8);

q97.set("3. You run to the kitchen to find a weapon. You grab the....","Meat cleaver.","Knife","spoon.",'a',2,4,8);

q98.set("4. Once you grab your weapon you head for the....","I'm scared.(You kill yourself)'","Garage.(Where you keep your car)","Run after the killer.",'a',2,4,8);

q99.set("5. You were on your way to your room but you were cornered by one of the killers you....","Go up to him ready to stab and counter attack.","You throw your weapon at him.","I'm already dead.",'a',2,4,8);

q100.set("6. You manage to kill the killer(but in the struggle you break your knife) and grab your car keys....Where now?)","Back to the kitchen. I'm hungry.","Im going to go to kill the otherr killer.","The garage.",'a',2,4,8);

q101.set("7. You head off to the garage and see your car you....","Check the car for sometingh like a phone or something else.\n""Open the garage door and drive away.","Get in the car and drive away.","Open the garrage door and drive away.",'a',2,4,8);

q102.set("8. The other killer is out there. You decide to run outside.\nYou do not see him and he grazes your shoulder with a bullet. You run \nback inside the house(You take the front door). Then you....","Find a weapon and take on both of the killers.","You leave a blood trail going into the bathroom and \nrun off back to the car.","Still dead here!",'a',2,4,8);

q103.set("9. You leave a blood trail and head off to the garage. You fooled one killer \nbut the other one stayed in the garage.He does not see you so you. You kill him \nby hitting him in the head with the car jack repeatedly. You then....","I'm still DEAD!","Get in the car and drive off.","Look for the other killer.",'a',2,4,8);

q104.set("10. You decide to ram him but you hurt yourself in the process. \n""You are now knocked out. You wake up and killer is coming towards you(unaemed) so you.....","Get up and....wait I'M STILL DEAD!","Get up and fight  him.","Get up and cry.",'a',2,4,8);

q105.set("11. You have escaped by beating the crap out of the killer....Oh\nwait no you didn't because I'm the killer and I knew your every move\n""so I killed YOU!","I'm alive stupid I kill you.(Wrong answer)","I died?(Correct answer)","I'm alive because you are to weak to kill me \nyou spineless little worm.(Worng answer)",'a',2,4,8);

system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

    void deathtwo()

{system("cls");  

 Question q106, q107, q108, q109, q110, q111, q112, q113, q114;

q106.sset("1.People looks like ghosts to the dead.","Yes","No",'a',4);

q107.sset("1. The dead can never walk with the living. ","Yes","No",'a',4);

q108.sset("1.You can hear screams and lies of the dead. ","Yes","No",'a',4);

q109.sset("1.Aleasha is the Queen of the Dead. ","Yes","No",'a',4);

q110.sset("1.The dead cannot be reborn. ","Yes","No",'a',4);

q111.sset("1. The dead cannot bleed.","Yes","No",'a',4);

q112.sset("1. The dead is the only thing that can live forever.","Yes","No",'a',4);

q113.sset("1. The living cannot see or hear the dead.","Yes","No",'a',4);

q114.sset("1.You can see the living feast on the dead. ","Yes","No",'a',4);

system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void deaththree()

     {system("cls");

      Question q115, q116, q117, q118, q119, q120, q121, q122, q123;

q115.setValues("1. Have you ever killed someone?","Once.................","Of course not!","I have wanted to at times......................","Yeah A lot of times",'a',4);

q116.setValues("2. Are you one of those people who like to play around with knives/pretend to strangle people?","I LIKE STRANGLING AND KNIFE PLAYING!","No","Knives are fun when you play with them!","I only loosely strangle them as a joke! I AM INNOCENT!",'a',4);

q117.setValues("3. Do you ever think about how blood tastes?","Sometimes............","never on my dead body","I love sucking blood!","NO!",'a',4);

q118.setValues("4. What letter does your name begin with?","U-Z","A-F","N-T","G-, M",'a',4);

q119.setValues("5. What is your age?","46-65","66-99","15-21","22-45",'a',4);

q120.setValues("6. Ever had a relationship with someone?","Yeah I am a total datemaster!","A few times","once.........","No.",'a',4);

q121.setValues("7. Do you like seeing comedy shows?","I'm more of a murder and crime viewer","YEAH TOTALLY!","Laughter is the best medicine","i guess",'a',4);

q122.setValues("8. When was the last time you had to go to a mental rehabilitation centre?","Today","NEVER.","A week ago","A year ago",'a',4);

q123.setValues("9. This is the final question:If your result says you are a killer what would you do?","whatever","HELLO! I AM SO NOT A KILLER","Say that this quiz is crap!","I'm HAPPY!!!!",'a',4);

system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}  

void iqqone()

{system("cls");

Question q124,  q126, q127, q128, q129, q130, q131, q132, q133, q134, q135, q136;

q124.setValues("1. Before Mt. Everest was discovered, what was the highest mountain in the world?","No mountain","Mt. Kilimanjaro","Mount Davidson","K2",'a',4);

q126.setValues("2. Does England have a 4th of July?","No","Yes","I don't know","of course NO!",'a',4);

q127.setValues("3. What can you never eat for breakfast?","Something sugary","Dinner","Lunch","Supper",'a',4);

q128.setValues("4. If there are three apples and you took two away, how many do you have?","One","None","Two","I don't know",'a',4);

q129.setValues("5. Which is heavier, 100 pounds of rocks or 100 pounds of gold?","100 pounds of gold","They weigh the same","100 pounds of rocks","I don't know",'a',4);

q130.setValues("6. Can you spell 80 in two letters?","A-T","EIGH-TY","AI-TY","It's not possible",'a',4);

q131.setValues("7. What question must always be answered ''Yes''?","Will everyone die someday?","Are you a human?","Does everyone have a biological mother?","What does Y-E-S spell?",'a',4);

q132.setValues("8. How many sides does a circle have?","The back","Two","Four","None. It's a circle",'a',4);

q133.setValues("9. What has a tail but no body?","A coin!","A human!","A cloud!","Pencile",'a',4);

q134.setValues("10. What word in the English language is always spelled incorrectly?","Incorrectly","It's possible to spell anything right as long as you learn it","Shakespeare","Onomatopoeia",'a',4);

q135.setValues("11. What rotates but still remains in the same place?","Stairs","Bottle (spin the bottle game)","Clock","Ball",'a',4);

q136.setValues("12. How can you lift an elephant with one hand?","Truck","There is no such thing","Use a lever","Use both hands!",'a',4);

system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

void iqqtwo()

{system("cls");

Question q137, q138, q139, q140, q141, q142, q143, q144, q145, q146;

    q137.set("1. Can a match box?","No, but a tin can.","I don't know.","Yes.",'a',2,4,8);

    q138.set("2. How do you get two whales in a car?","Drive down the M4","You can't.","One in the front, one in the back",'a',2,4,8);

    q139.set("3. If tomato is a fruit, then doesn't that make ketchup a smoothie?","No","What?","Yeah!",'c',2,4,8);

    q140.set("4. .sdrawkcab noitseuq siht rewsna","But whats the answer?","K.O","I don't understand?",'b',2,4,8);

    q141.set("5. Click the answer","Yeah","No","The answer",'c',2,4,8);

    q142.set("6. How many holes in a polo?","Two","One","Three",'b',2,4,8);

    q143.set("7. The answer is really big!!","Huge!","An elephant","Really big",'c',2,4,8);

    q144.set("8. What follows December 2nd","December 3rd","N","A question mark",'b',2,4,8);

    q145.set("9. If Cinderella's glass slipper fitted perfectly, why did it fall off?","It didn't","She must have deliberately kicked it off","Her foot shrank",'b',2,4,8);

    q146.set("10. What can you put in a bucket to make it lighter?","Air","A torch","A hole",'b',2,4,8);

system("cls");

   queload();

   if(score>=20)

   pass();

   else

   fail();

   score=0;

   n=1;

}

};

class fun : public subfun{

private:

int ch;

public:

void qgame()

{BB:

system("color 80");

system("cls");

 cout<<"\n\t\t================================"<<endl;

        cout<<"\t================== Categories =================="<<endl;

cout<<"\n\t\t\t1: c++ Language"<<endl;

cout<<"\t\t\t2: Technology"<<endl;

cout<<"\t\t\t3: Solar System"<<endl;

            cout<<"\t\t\t4: World History"<<endl;

            cout<<"\t\t\t5: Islam Basic"<<endl;

            cout<<"\t\t\t6: back to Main menu"<<endl;

cout<<"\n\tSelect any one category : ";

cin>>ch;

switch(ch){

case 1:

    cpp();

    goto BB;

case 2:

    technology();

    goto BB;

case 3:

          ss();

          goto BB;

case 4:

    worldh();

    goto BB;

case 5:

islamb();

goto BB;

case 6:

goto AA;

default:{

rkey();

goto BB;

}

}

AA:

cout<<"";

}

void addicted()

{EE:

system("color 80");

system("cls");

        cout<<"\n\t\t================================"<<endl;

        cout<<"\t================== Addicted =================="<<endl;

        cout<<"\n\n\n\t\t\t1: Are you Addicted to your Cell phone?"<<endl;

        cout<<"\n\t\t\t2: Testaholic Quiz"<<endl;

        cout<<"\n\t\t\t3: Are you addicted to video game?"<<endl;

        cout<<"\n\t\t\t4: Internet addiction"<<endl;

        cout<<"\n\t\t\t5: Back to FunQuizzes"<<endl;

        cout<<"\n\tEnter your choice... : ";

        cin>>ch;

        switch(ch){

        case 1:

        addione();

        goto EE;

        case 2:

        additwo();

        goto EE;

        case 3:

        addithree();

        goto EE;

        case 4:

        addifour();

        goto EE;

        default:{

        rkey();

        goto EE;

    }

}

}

void deathq()

{FF:

system("color 80");

system("cls");

        cout<<"\n\t\t================================"<<endl;

        cout<<"\t================== Death Quizzes =================="<<endl;

        cout<<"\n\n\n\t\t\t1: Death House"<<endl;

        cout<<"\n\t\t\t2: True or False, Are You DEAD?"<<endl;

        cout<<"\n\t\t\t3: How much of a Killer are you?"<<endl;

        cout<<"\n\t\t\t4: Back to FunQuizzes"<<endl;

        cout<<"\n\tEnter your choice... : ";

        cin>>ch;

        switch(ch){

        case 1:

deathone();

goto FF;

case 2:

deathtwo();

goto FF;

case 3:

deaththree();

goto FF;

case 4:

//funquizzes

default:{

rkey();

goto FF;

}

}

        }

        void iqq()

{GG:

system("color 80");

        system("cls");

        cout<<"\n\t\t================================"<<endl;

        cout<<"\t================== IQ quizzes and Fun Thinking =================="<<endl;

        cout<<"\n\n\n\t\t\t1: Can You Answer These Tricky Questions?"<<endl;

        cout<<"\n\t\t\t2: The impossible Quiz"<<endl;

        cout<<"\n\t\t\t3: Back to FunQuizzes"<<endl;

        cout<<"\n\tEnter your choice... : ";

        cin>>ch;

switch(ch)

{

case1 :

iqqone();

goto GG;

case 2:

iqqtwo();

goto GG;

case 3:

//funquizzes

default:

{

rkey();

goto GG;

}

}

}

};

class funmenu:public fun{

int cho;

public:

void fquiz()

{DD:

system("color 80");

system("cls");

        cout<<"\n\t\t================================"<<endl;

        cout<<"\t================== Fun Quizzes =================="<<endl;

        cout<<"\n\n\n\t\t\t1: Addicted"<<endl;

        cout<<"\n\t\t\t2: Death Quizes"<<endl;

        cout<<"\n\t\t\t3: IQ quizzes and fun thinking"<<endl;

        cout<<"\n\t\t\t4: back to mainmenu"<<endl;

        cout<<"\n\tEnter your choice... : ";

        cin>>cho;

        switch(cho){

        case 1:

        addicted();

        goto DD;

case 2:

deathq();

goto DD;

case 3:

iqq();

goto DD;

case 4:

//goto AA;

default:

{

rkey();

goto DD;

};}

}

void about(){

system("cls");

system("color 16");

cout<<"\n\n\n================================================================================"<<endl;

cout<<"================================= About ===================================="<<endl;

cout<<"\n\n\n\n\t\t\tQuiz of Knowledge"<<endl;

cout<<"\t\t\tGame version:2017"<<endl;

cout<<"\n\t\tPress any key to go back MAIN MENU....";

getch();

system("color 0f");

//mainmenu();


}

};


class menu:public funmenu{

int cho;

public:

void mainmenu()

    {AA:

    system("color 80");

system("cls");

        cout<<"\n\t\t================================"<<endl;

        cout<<"\t================== Main Menu =================="<<endl;

        cout<<"\n\n\n\t\t\t1: Quick Game"<<endl;

        cout<<"\n\t\t\t2: Fun Quizzes"<<endl;

        cout<<"\n\t\t\t3: High Scores"<<endl;

        cout<<"\n\t\t\t4: About"<<endl;

        cout<<"\n\t\t\t5: Exit"<<endl;

        cout<<"\n\tEnter your choice... : ";

        cin>>cho;

switch(cho){

case 1:

qgame();

goto AA;

case 2:

fquiz();

case 3:

system("cls");

hscore();

getch();

goto AA;

case 4:

about();

goto AA;

    case 5:

break;

default:{

rkey();

goto AA;

}}

}


void game_intro(){

string respond;

string name;

gameintro:

{

system("cls");

system("color 02");

cout<<"\n\n\n";

 cout<<"\n\t    ===================================="<<endl;

  cout<<"\t\t   Welcome To My Project"<<endl;

 cout<<"\t================ QUIZ GAME ================"<<endl;

  cout<<"\n";}

name:

{

    cout<<"\n\t\tEnter your name_ : ";

   

    getline(cin,name);

}

asking:

{

system("color 02");

cout << "\n\n\n\tAre you ready to start the quiz, " << name << "? Yes/No....";

    cin >> respond;

     if (respond == "Yes" || respond == "yes" || respond == "y" || respond == "Y")

  {

  system("cls");

  system("color 2f");

        cout << "\n";

        cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\tGOOD LUCK!\n";

    cout << "\n";

       cout << "\t\t\tPress enter to continue.";

       getch();//the game starts there.

    

   }

    if (respond != "Yes" && respond != "yes" && respond != "y" && respond != "Y" && respond != "No" && respond != "no" && respond!= "n" && respond != "N" )

{

    cout<<"\n";

    rkey();

    goto asking;

}

   if (respond == "No" || respond == "no" || respond== "n" || respond == "N")

   {

        cout << "\n";

      cout << "Goodbye!\n";

        cin.get();

        exit;

    }// quiz ends.

}}

};


main()

{


menu my;

menu g;

g.game_intro();

Question ql;

ql.load();

menu m;

m.mainmenu();

}


Output: