#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;
q=2;
}
switch(q)
{
case 1: s1.set1();
break;
case 2: s2.set2();
break;
default : cout<<"\a Error";
}
getch();
}
//*************** END OF MAIN **********************
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();
}
}
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";
}
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<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<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<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<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<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<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<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**********************************************";
}
}
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....?";
//******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<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<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<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<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<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<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<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 *********