Anda di halaman 1dari 38

//************** Quiz Game ************

//Consisting of 2 sets with 10 questions in each set


//It also includes 50-50 lifeline

#include<iostream .h>
#include<ctype .h>
#include<string .h>
#include<conio .h>
#include<stdio .h>
#include<stdlib .h>
class quiz
{
public :
void set1();
void ques1();
void ques2();
void ques3();
void ques4();
void ques5();
void ques6();
void ques7();
void ques8();
void ques9();
void ques10();
void fifty1();
void fifty2();
void fifty3();
void fifty4();

void fifty5();
void fifty6();
void fifty7();
void fifty8();
void fifty9();
void fifty10();
}s1;
class quiz2
{
public :
void set2();
void ques1();
void ques2();
void ques3();
void ques4();
void ques5();
void ques6();
void ques7();
void ques8();
void ques9();
void ques10();
void fifty1();
void fifty2();
void fifty3();
void fifty4();
void fifty5();
void fifty6();
void fifty7();

void fifty8();
void fifty9();
void fifty10();
}s2;
long int pts;
int t=0,flag=0;
char ans[1],w;

//******************* MAIN PART ****************


void main()
{
clrscr();
int age,q;
char name[30];
gotoxy(20,10);
cout< <"\n THIS IS A QUIZ GAME ";
cout<<"\n\n\n FIRST ANSWER THE ELIGIBLE QUESTION TO PLAY THE GAME";
cout<<"\n Enter the name:-";
gets(name);
cout<<"\nEnter the age:-";
cin>>age;
if(age>=25 && age<=35)
{
q=1;
}
if(age>35 && age< =45)
{

q=2;
}
switch(q)
{
case 1: s1.set1();
break;
case 2: s2.set2();
break;
default : cout<<"\a Error";

}
getch();
}
//*************** END OF MAIN **********************

//******** SET 1 *********


void quiz::set1()
{
clrscr();
cout<<"\n This is your eligibility question ";
cout<<"\n\n\n\n In computer,what is 1 gigabyte?";
cout<<"\n(a)1024*2 bytes"<<"\t(b)1024*1024*1024 bytes";
cout<<"\n(c)1024*3 bytes"<<"\t(d)NONE OF THESE";
char rs[]="b";
cout<<"\n Enter your answer :- ";
cin>>ans;
strlwr(ans);

t=strcmp(ans,rs);
if(t==0)
{
clrscr();
cout< <"\n You have qualified";
gotoxy(20,10);
cout<<"\n ***********************************";
cout<<"\n **WELCOME TO THIS GRAND QUIZ SHOW**";
cout<<"\n ***********************************";
cout<<"\n\n\n\n HERE YOU WILL BE ASKED A QUESTION & FOUR OPTIONS ";
cout<<"\n WILL BE THERE, IN WHICH THREE ARE WRONG AND ONLY ONE";
cout<<"\n IS CORRECT.YOU HAVE TO GIVE THE CORRECT ANSWER ";
cout<<"\n YOU HAVE A 50 - 50 HELP LINE IN WHICH THERE WILL BE ";
cout<<"\n ONLY TWO OPTIONS OF WHICH ONLY ONE IS CORRECT. YOU";
cout<<"\n HAVE TO GIVE THE CORRECT ANSWER.ANY WRONG ANSWER
MEANS YOU ";
cout<<"\n FINISH THE GAME THERE ONLY. ";
cout<<"\n ******** YOU CAN TAKE ONLY THREE HELP LINES *********";
cout<<"\n\n\n\n\n PRESS ENTER TO START THE GAME ";
getch();
s1.ques1();
}
else
{
cout<<"\a UNSUCESSFUL \a";
cout<<"\n\n\t\t BETTER LUCK NEXT TIME ";
getch();
}
}

//************** QUESTION 1 ***************


void quiz::ques1()
{
clrscr();
cout<<"\n What do you mean by Hexadecimal in computer?";
cout<<"\n (a)With a base of 16"<<"\t(b)With a base of 6";
cout<<"\n (c)With a base of 8"<<"\t(d)NONE OF THESE";
char rs[]="a";
cout<<"\n DO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y'|| w=='y')
{
flag++;
s1.fifty1();
}
cout< <"\n Please give your answer :- ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=1000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\n PRESS ANY KEY FOR THE NEXT QUESTION ";
getch();

s1.ques2();
}
else
{
cout<<"\aUNSUCESSFUL\a";
getch();
}
}
void quiz::fifty1()
{
clrscr();
cout<<"\nWhat do you mean by Hexadecimal in computer?";
cout<<"\n(a)With a base of 16"<<"\t(b)With a base of 6";
}

//******** QUESTION 2 ************


void quiz::ques2()
{
clrscr();
cout<<"\n Who has written the book 'DIVINE LIFE?";
cout<<"\n (a)Charles Dickens"<<"\t(b)Dante Alighieri";
cout<<"\n (c)Swami Sivananda"<<"\t(d)Karl Marx";
char rs[]="c";
cout<<"\n DO YOU WANT 50/50 LIFELINE (Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{

flag++;
s1.fifty2();
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=2000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\n PRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques3();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz::fifty2()
{
clrscr();
cout<<"\nWho has written the book 'DIVINE LIFE?";
cout<<"\n(c)Swami Sivananda"<<"\t(d)Karl Marx";
}

//******Question 3 *******
void quiz::ques3()
{
clrscr();
cout<<"\n Who has written the book'ONE LIFE'?";
cout<<"\n (a)Christian Barnard"<<"\t(b)Wendell Wilkie";
cout<<"\n (c)William Wordsworth"<<"\t(d)Charles Darwin";
char rs[]="a";
cout<<"\n DO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s1.fifty3();
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=3000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques4();

}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz::fifty3()
{
clrscr();
cout<<"\nWho has written the book'ONE LIFE'?";
cout<<"\n(a)Christian Barnard"<<"\n(c)William Wordsworth";
}

//**********Question 4************
void quiz::ques4()
{
clrscr();
cout<<"\nWhich game is associate with 'YONEX CUP'?";
cout<<"\n(a)Golf"<<"\t(b)Baseball";
cout<<"\n(c)Yatch Racing"<<"\t(d)Badminton";
char rs[]="d";
if(flag&lt;3)
{
flag++;
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')

{
flag++;
s1.fifty4();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=5000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques5();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz::fifty4()
{
clrscr();
cout<<"\nWhich game is associate with 'YONEX CUP'?";
cout<<"\n(a)Golf"<<"\t(d)Badminton";

//***********Question 5*************
void quiz::ques5()
{
clrscr();
cout<<"\nWho invented 'MECHANICAL CLOCK'?";
cout<<"\n(a)C.Hugyens"<<"\t(b)Samuel Colt";
cout<<"\n(c)Hsing and Ling-Tsan"<<"\t(d)Wilhelm Roentgen";
char rs[]="c";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s1.fifty5();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=10000;

gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques6();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz::fifty5()
{
clrscr();
cout<<"\nWho invented 'MECHANICAL CLOCK'?";
cout<<"\n\t(b)Samuel Colt"<<"\n(c)Hsing and Ling-Tsan";
}

//********Question 6**********
void quiz::ques6()
{
clrscr();
cout<<"\nWho invented 'ELECTRIC RAZOR'?";
cout<<"\n(a)K.G.Gillet1e"<<"\t(b)Viscose Co.";
cout<<"\n(c)L.C.Young"<<"\t(d)Col.J.Schick";
char rs[]="d";
if(flag&lt;3)

{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'|| w=='y')
{
flag++;
s1.fifty6();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=20000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques7();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz::fifty6()

{
clrscr();
cout<<"\nWho invented 'ELECTRIC RAZOR'?";
cout<<"\n\t(b)Viscose Co."<<"\n\t(d)Col.J.Schick";
}

//********Question 7*******
void quiz::ques7()
{
clrscr();
cout<<"\nWho invented 'WATERPROOF RUBBER'?";
cout<<"\n(a)A.Catlin"<<"\t(b)Charles GoodYear";
cout<<"\n(c)J.Harrison"<<"\t(d)Charles Macintosh";
char rs[]="b";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s1.fifty7();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);

t=strcmp(ans,rs);
if(t==0)
{
pts=40000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques8();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz::fifty7()
{
clrscr();
cout<<"\nWho invented 'WATERPROOF RUBBER'?";
cout<<"\n\t(b)Charles GoodYear"<<"\n\t(d)Charles Macintosh";
}

//*********Question 8**********
void quiz::ques8()
{
clrscr();
cout<<"\nWhere the disease named 'GLAUCOMA' is affected in the human body?";

cout<<"\n(a)Skin"<<"\t(b)Eyes"<<"\n(c)Spleen"<<"\t(d)blood";
char rs[]="b";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s1.fifty8();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=80000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques9();
}
else
{
cout<<"\aUNSUCCESFUL\a";

}
}
void quiz::fifty8()
{
clrscr();
cout<<"\nWhere the disease named 'GLAUCOMA' is affected in the human body?";
cout<<"\n\t(b)Eyes"<<"\n(c)Spleen";
}

//*******Question 9*********
void quiz::ques9()
{
clrscr();
cout<<"\nWhen was Abrahim Lincoln was re-elected as president of U.S.?";
cout<<"\n(a)1864"<<"\t(b)1814"<<"\n(c)1865"<<"\t(d)1819";
char rs[]="a";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s1.fifty9();
}
}
cout< <"\n Please give your answer ";

cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=160000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques10();
}
else
{
cout<<"\aUNSUCESSFUL\a";
}
}
void quiz::fifty9()
{
clrscr();
cout<<"\nWhen was Abrahim Lincoln was re-elected as president of U.S.?";
cout<<"\n(a)1864"<<"\n(c)1865";
}

//*********Question 10**********
void quiz::ques10()
{

clrscr();
cout<<"\nFormer prime minister 'Charan singh' was ";
cout<<"related to which political party?";
cout<<"\n(a)Janata dal"<<"\t(b)Lok dal";
cout<<"\n(c)Congress"<<"\t(d)A.I.A.D.M.K.";
char rs[]="b";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s1.fifty10();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=320000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
getch();
clrscr();
cout<<"\n**********************************************";

cout<<"\nCONGRATULATIONS YOU HAVE COMPLETED THE FULL SET ";


cout<<"\n**********************************************";
}
else
{
cout<<"\aUNSUCESSFUL\a";
}
}
void quiz::fifty10()
{
clrscr();
cout<<"\nFormer prime minister 'Charan singh' was related";
cout<<"to which political party?";
cout<<"\n(a)Janata dal"<<"\t(b)Lok dal";
}
//******** End of SET 1 *********

//******** SET 2 *********


void quiz2::set2()
{
clrscr();
cout<<"\n This is your eligibility question ";
cout<<"\n\n\n\nThe Provisional Government of Independent ";
cout<<"India was formed at...?";
cout<<"\n(a)Tokyo"<<"\t(b)Singapore";
cout<<"\n(c)Jakarta"<<"\t(d)Kuala Lumpur";
char rs[]="b";

cout<<"\nEnter your answer :- ";


cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
clrscr();
cout< <"\nYou have qualified";
gotoxy(20,10);
cout<<"\n***********************************";
cout<<"\n**WELCOME TO THIS GRAND QUIZ SHOW**";
cout<<"\n***********************************";
cout<<"\n\n\n\nHERE YOU WILL BE ASKED A QUESTION & FOUR OPTIONS ";
cout<<"\nWILL BE THERE, IN WHICH THREE ARE WRONG AND ONLY ONE";
cout<<"\nIS CORRECT.YOU HAVE TO GIVE THE CORRECT ANSWER ";
cout<<"\nYOU HAVE A 50 - 50 HELP LINE IN WHICH THERE WILL BE ";
cout<<"\nONLY TWO OPTIONS OF WHICH ONLY ONE IS CORRECT. YOU";
cout<<"\nHAVE TO GIVE THE CORRECT ANSWER.ANY WRONG ANSWER
MEANS YOU ";
cout<<"\nFINISH THE GAME THERE ONLY. ";
cout<<"\n******** YOU CAN TAKE ONLY THREE HELP LINES *********";
cout<<"\n\n\n\n\nPRESS ENTER TO START THE GAME ";
getch();
s2.ques1();
}
else
{
cout<<"\aUNSUCESSFUL BETTER LUCK NEXT TIME \a";
getch();

}
}

//************** QUESTION 1**************


void quiz2::ques1()
{
clrscr();
cout<<"\nThe British Viceroy who took a number of measures for";
cout<<"\npreserving ancient buildings and monuments in India was...?";
cout<<"\n(a)Lord Rippon"<<"\t(b)Lord Curzon";
cout<<"\n(c)Lord Minto"<<"\t(d)Lord Irwin";
char rs[]="d";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y'|| w=='y')
{
flag++;
s2.fifty1();
}
cout< <"\n Please give your answer :- ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=1000;
gotoxy(50,22);

cout< <" YOUR SCORE IS :- "<<pts;


cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques2();
}
else
{
cout<<"\aUNSUCESSFUL\a";
getch();
}
}
void quiz2::fifty1()
{
clrscr();
cout<<"\nThe British Viceroy who took a number of measures for ";
cout<<"preserving ancient buildings and monuments in India was...?";
cout<<"\t(b)Lord Curzon"<<"\t(d)Lord Irwin";
}

//******** QUESTION 2*******


void quiz2::ques2()
{
clrscr();
cout<<"\nThe name of the bird sancuary at Bharatpur is....?";
cout<<"\n(a)Bhansrod Garh sanctuary"<<"\t(b)Darrah Sanctuary";
cout<<"\n(c)Ghana Sanctuary"<<"\t(d)Ghatprabha Sanctuary";
char rs[]="c";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N)";

cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s2.fifty2();
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=2000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques3();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz2::fifty2()
{
clrscr();
cout<<"\nThe name of the bird sancuary at bharatpur is....?";

cout<<"\n(a)Bhansrod Garh sanctuary"<<"\n(c)Ghana Sanctuary";


}

//******Question 3******
void quiz2::ques3()
{
clrscr();
cout<<"\nWho is known as the 'Father of Geometry'?";
cout<<"\n(a)Kepler"<<"\t(b)Euclid"<<"\n(c)Pythagoras"<<"\t(d)Newton";
char rs[]="b";
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s1.fifty3();
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=3000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";

getch();
s2.ques4();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz2::fifty3()
{
clrscr();
cout<<"\nWho is known as the 'Father of Geometry'?";
cout<<"\n(b)Euclid"<<"\n(c)Pythagoras";
}

//**********Question 4***********
void quiz2::ques4()
{
clrscr();
cout<<"\nHow many centuries did Sachin score against Kenya ?";
cout<<"\n(a)2"<<"\t(b)3"<<"\n(c)6"<<"\t(d)4";
char rs[]="d";
if(flag&lt;3)
{
flag++;
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;

if(w=='Y'||w=='y')
{
flag++;
s2.fifty4();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=5000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques5();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz2::fifty4()
{
clrscr();
cout<<"\nHow many centuries did Sachin score against Kenya ?";

cout<<"\n(c)6"<<"\n(d)4";
}

//********Question 5*********
void quiz2::ques5()
{
clrscr();
cout<<"\nThe disease caused in apple by bacteria is...?";
cout<<"\n(a)Wild fire disease" <<"\t(b)Black rot disease";
cout<<"\n(c)Ring disease"<<"\t(d)Fire blight disease";
char rs[]="d";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s2.fifty5();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{

pts=10000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques6();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz2::fifty5()
{
clrscr();
cout<<"\nThe disease caused in apple by bacteria is...?";
cout<<"\n(a)Wild fire disease" <<"\t(d)Fire blight disease";
}

//********Question 6**********
void quiz2::ques6()
{
clrscr();
cout<<"\nBlood calcium level can be increased by administration of.... ?";
cout<<"\n(a)Glucagon"<<"\t(b)Parathormone";
cout<<"\n(c)Thyroxine"<<"\t(d)Calcitonin";
char rs[]="b";

if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'|| w=='y')
{
flag++;
s2.fifty6();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=20000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques7();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}

void quiz2::fifty6()
{
clrscr();
cout<<"\nBlood calcium level can be increased by administration of.... ?";
cout<<"\t(b)Parathormone"<<"\n(c)Thyroxine";
}

//*********Question 7**************
void quiz2::ques7()
{
clrscr();
cout<<"\nAn element E from a solid oxide which dissolves";
cout<<"\nin water to give an acidic solution, the element-E is....?";
cout<<"\n(a)H"<<"\t(b)P"<<"\n(c)Mg"<<"\t(d)N";
char rs[]="b";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s2.fifty7();
}
}
cout< <"\n Please give your answer ";
cin>>ans;

strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=40000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques8();
}
else
{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz2::fifty7()
{
clrscr();
cout<<"\nAn element E from a solid oxide which dissolves in water";
cout<<" to give an acidic solution, the element-E is....?";
cout<<"\n(b)P"<<"\n(c)Mg";
}

//******Question 8********
void quiz2::ques8()
{

clrscr();
cout<<"\nEzra Cup is associated with which sports?";
cout<<"\n(a)Rowing"<<"\t(b)Golf"<<"\n(c)Air races"<<"\t(d)polo";
char rs[]="d";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s2.fifty8();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=80000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques9();
}
else

{
cout<<"\aUNSUCCESFUL\a";
}
}
void quiz2::fifty8()
{
clrscr();
cout<<"\nEzra Cup is associated with which sports?";
cout<<"\n(c)Air races"<<"\n(d)polo";
}

//*********Question 9***********
void quiz2::ques9()
{
clrscr();
cout<<"\nThe headquaters of ILO is located in...?";
cout<<"\n(a)Geneva"<<"\t(b)The Hague"<<"\n(c)New York"<<"\t(d)Rome";
char rs[]="a";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s2.fifty9();
}

}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=160000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s2.ques10();
}
else
{
cout<<"\aUNSUCESSFUL\a";
}
}
void quiz2::fifty9()
{
clrscr();
cout<<"\nThe headquaters of ILO is located in...?";
cout<<"\n(a)Geneva"<<"\t(b)The Hague";
}

//*********Question 10***********

void quiz2::ques10()
{
clrscr();
cout<<"\nWhat is October 8th celebrated for...?";
cout<<"\n(a)Army Day"<<"\t(b)U.N.O Day";
cout<<"\n(c)Airforce Day"<<"\t(d)Navy Day";
char rs[]="c";
if(flag&lt;3)
{
cout<<"\nDO YOU WANT 50/50 LIFELINE(Y/N)";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s2.fifty10();
}
}
cout< <"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=320000;
gotoxy(50,22);
cout< <" YOUR SCORE IS :- "<<pts;
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();

clrscr();
cout<<"\n**********************************************";
cout<<"\nCONGRATULATIONS YOU HAVE COMPLETED THE FULL SET ";
cout<<"\n**********************************************";
}
else
{
cout<<"\aUNSUCESSFUL\a";
}
}
void quiz2::fifty10()
{
clrscr();
cout<<"\nWhat is October 8th celebrated for...?";
cout<<"\n(c)Airforce Day"<<"\t(d)Navy Day";
}
//******** End of SET 2 *********
//******** End of Quiz *********

Anda mungkin juga menyukai