C++
C++ Project on Quiz
Quiz
#include
#include
#include
#include
#include
#include
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 ques11();
void ques12();
void ques13();
void ques14();
void ques15();
void fifty1();
void fifty2();
void fifty3();
void fifty4();
void fifty5();
void fifty6();
void fifty7();
void fifty8();
void fifty9();
void fifty10();
void fifty11();
void fifty12();
void fifty13();
void fifty14();
void fifty15();
}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 ques11();
void ques12();
void ques13();
void ques14();
void ques15();
void fifty1();
void fifty2();
void fifty3();
void fifty4();
void fifty5();
void fifty6();
void fifty7();
void fifty8();
void fifty9();
void fifty10();
void fifty11();
void fifty12();
void fifty13();
void fifty14();
void fifty15();
}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<<"\nEnter the name:-";
gets(name);
cout<<"\nEnter the age:-";
cin>>age;
if(age>=25 && age<=35)
{
q=1;
}
if(age>35 && age<=45)
{
q=2;
}
if(age>45 && age<=55)
{
q=3;
}
switch(q)
{
case 1: s1.set1();
break;
case 2: s2.set2();
break;
default : cout<<"\aError";
}
getch();
}
//*************** END OF MAIN **********************
//******** SET 1
void quiz::set1()
{
clrscr();
cout<<"\n This is your eligibility question ";
cout<<"\n\n\n\nIn 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<<"\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();
s1.ques1();
}
else
{
cout<<"\aUNSUCESSFUL\a";
cout<<"\n\n\t\t BETTER LUCK NEXT TIME ";
getch();
}
}
//************** QUESTION 1
void quiz::ques1()
{
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";
cout<<"\n(c)With a base of 8"<<"\t(d)NONE OF THESE";
char rs[]="a";
cout<<"\nDO 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;
s1.ques2();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 2
void quiz::ques2()
{
clrscr();
cout<<"\nWhich of the following is not an input device?";
cout<<"\n(a)Mouse"<<"\t(b)Keyboard";
cout<<"\n(c)Scanner"<<"\t(d)Monitor";
char rs[]="d";
cout<<"\nDO 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;
s1.ques3();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 3
void quiz::ques3()
{
clrscr();
cout<<"\nWhich of the following is not an output device?";
cout<<"\n(a)Monitor"<<"\t(b)Printer";
cout<<"\n(c)Keyboard"<<"\t(d)Speaker";
char rs[]="c";
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;
s1.ques4();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 4
void quiz::ques4()
{
clrscr();
cout<<"\nFull form of ALU?";
cout<<"\n(a)Arithmetic Logical Unit"<<"\t(b)Arithmetic Logical Union";
cout<<"\n(c)Arithmetic Limit Unit"<<"\t(d)NONE OF THESE";
char rs[]="a";
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;
s1.ques5();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 5
void quiz::ques5()
{
clrscr();
cout<<"\nWho invented the first computer?";
cout<<"\n(a)Charles Babbage"<<"\t(b)Blaise Pascal";
cout<<"\n(c)Ada Lovelace"<<"\t(d)Alan Turing";
char rs[]="a";
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;
s1.ques6();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 6
void quiz::ques6()
{
clrscr();
cout<<"\nWhich language is directly understood by the computer?";
cout<<"\n(a)C++"<<"\t(b)Machine language";
cout<<"\n(c)Pascal"<<"\t(d)NONE OF THESE";
char rs[]="b";
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;
s1.ques7();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 7
void quiz::ques7()
{
clrscr();
cout<<"\nWhat does RAM stand for?";
cout<<"\n(a)Random Access Memory"<<"\t(b)Read Access Memory";
cout<<"\n(c)Random Arithmetic Memory"<<"\t(d)NONE OF THESE";
char rs[]="a";
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;
s1.ques8();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 8
void quiz::ques8()
{
clrscr();
cout<<"\nWhat does ROM stand for?";
cout<<"\n(a)Read Only Memory"<<"\t(b)Random Only Memory";
cout<<"\n(c)Read Original Memory"<<"\t(d)NONE OF THESE";
char rs[]="a";
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;
s1.ques9();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 9
void quiz::ques9()
{
clrscr();
cout<<"\nWhich of the following is a storage device?";
cout<<"\n(a)Floppy disk"<<"\t(b)CPU";
cout<<"\n(c)Modem"<<"\t(d)NONE OF THESE";
char rs[]="a";
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;
s1.ques10();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 10
void quiz::ques10()
{
clrscr();
cout<<"\nWhich of the following is an example of an operating system?";
cout<<"\n(a)MS-DOS"<<"\t(b)C++";
cout<<"\n(c)MS-Excel"<<"\t(d)NONE OF THESE";
char rs[]="a";
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;
s1.ques11();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 11
void quiz::ques11()
{
clrscr();
cout<<"\nWhat is the full form of CPU?";
cout<<"\n(a)Central Processing Unit"<<"\t(b)Central Program Unit";
cout<<"\n(c)Control Processing Unit"<<"\t(d)NONE OF THESE";
char rs[]="a";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s1.fifty11();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=640000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s1.ques12();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 12
void quiz::ques12()
{
clrscr();
cout<<"\nWhich of the following memories has the fastest access time?";
cout<<"\n(a)Cache memory"<<"\t(b)RAM";
cout<<"\n(c)ROM"<<"\t(d)Hard disk";
char rs[]="a";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s1.fifty12();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=1250000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s1.ques13();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 13
void quiz::ques13()
{
clrscr();
cout<<"\nWhich of the following is not a programming language?";
cout<<"\n(a)C++"<<"\t(b)Java";
cout<<"\n(c)MS-Word"<<"\t(d)Pascal";
char rs[]="c";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s1.fifty13();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=2500000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s1.ques14();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 14
void quiz::ques14()
{
clrscr();
cout<<"\nWhat is the binary equivalent of decimal 10?";
cout<<"\n(a)1010"<<"\t(b)1100";
cout<<"\n(c)1001"<<"\t(d)0110";
char rs[]="a";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s1.fifty14();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=5000000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s1.ques15();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 15
void quiz::ques15()
{
clrscr();
cout<<"\nWhich of the following is the brain of the computer?";
cout<<"\n(a)CPU"<<"\t(b)Monitor";
cout<<"\n(c)RAM"<<"\t(d)Hard disk";
char rs[]="a";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s1.fifty15();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=10000000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
cout<<"\n\n\t\t CONGRATULATIONS YOU HAVE WON THE GAME ";
getch();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//******** SET 2
void quiz2::set2()
{
clrscr();
cout<<"\n This is your eligibility question ";
cout<<"\n\n\n\nWho was the first Prime Minister of India?";
cout<<"\n(a)Mahatma Gandhi"<<"\t(b)Jawaharlal Nehru";
cout<<"\n(c)Sardar Patel"<<"\t(d)Dr. Rajendra Prasad";
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;
s2.ques2();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 2
void quiz2::ques2()
{
clrscr();
cout<<"\nWho wrote the Indian National Anthem?";
cout<<"\n(a)Rabindranath Tagore"<<"\t(b)Bankim Chandra";
cout<<"\n(c)Subhash Chandra Bose"<<"\t(d)NONE OF THESE";
char rs[]="a";
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;
s2.ques3();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 3
void quiz2::ques3()
{
clrscr();
cout<<"\nWho is known as the Father of the Nation in India?";
cout<<"\n(a)Jawaharlal Nehru"<<"\t(b)Mahatma Gandhi";
cout<<"\n(c)Sardar Patel"<<"\t(d)B.R. Ambedkar";
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;
s2.ques4();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 4
void quiz2::ques4()
{
clrscr();
cout<<"\nIn which year did India gain independence?";
cout<<"\n(a)1945"<<"\t(b)1947";
cout<<"\n(c)1950"<<"\t(d)1942";
char rs[]="b";
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;
s2.ques5();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 5
void quiz2::ques5()
{
clrscr();
cout<<"\nWho was the first President of India?";
cout<<"\n(a)Dr. Rajendra Prasad"<<"\t(b)Dr. S. Radhakrishnan";
cout<<"\n(c)Jawaharlal Nehru"<<"\t(d)NONE OF THESE";
char rs[]="a";
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;
s2.ques6();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 6
void quiz2::ques6()
{
clrscr();
cout<<"\nWhich river is known as the Ganga of the South?";
cout<<"\n(a)Godavari"<<"\t(b)Krishna";
cout<<"\n(c)Kaveri"<<"\t(d)Mahanadi";
char rs[]="a";
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;
s2.ques7();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 7
void quiz2::ques7()
{
clrscr();
cout<<"\nWhich is the largest state in India by area?";
cout<<"\n(a)Rajasthan"<<"\t(b)Madhya Pradesh";
cout<<"\n(c)Uttar Pradesh"<<"\t(d)Maharashtra";
char rs[]="a";
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;
s2.ques8();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 8
void quiz2::ques8()
{
clrscr();
cout<<"\nWhat is the capital of India?";
cout<<"\n(a)Mumbai"<<"\t(b)New Delhi";
cout<<"\n(c)Kolkata"<<"\t(d)Chennai";
char rs[]="b";
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;
s2.ques9();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 9
void quiz2::ques9()
{
clrscr();
cout<<"\nWhich is the national bird of India?";
cout<<"\n(a)Sparrow"<<"\t(b)Pigeon";
cout<<"\n(c)Peacock"<<"\t(d)Parrot";
char rs[]="c";
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;
s2.ques10();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 10
void quiz2::ques10()
{
clrscr();
cout<<"\nWho built the Taj Mahal?";
cout<<"\n(a)Akbar"<<"\t(b)Shah Jahan";
cout<<"\n(c)Aurangzeb"<<"\t(d)Humayun";
char rs[]="b";
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;
s2.ques11();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 11
void quiz2::ques11()
{
clrscr();
cout<<"\nWho wrote the Ramayana?";
cout<<"\n(a)Tulsidas"<<"\t(b)Valmiki";
cout<<"\n(c)Vyasa"<<"\t(d)Kalidas";
char rs[]="b";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s2.fifty11();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=640000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s2.ques12();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 12
void quiz2::ques12()
{
clrscr();
cout<<"\nWhich is the smallest continent in the world?";
cout<<"\n(a)Europe"<<"\t(b)Antarctica";
cout<<"\n(c)Australia"<<"\t(d)South America";
char rs[]="c";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s2.fifty12();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=1250000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s2.ques13();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 13
void quiz2::ques13()
{
clrscr();
cout<<"\nWhich is the longest river in the world?";
cout<<"\n(a)Amazon"<<"\t(b)Nile";
cout<<"\n(c)Ganga"<<"\t(d)Mississippi";
char rs[]="b";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s2.fifty13();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=2500000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s2.ques14();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 14
void quiz2::ques14()
{
clrscr();
cout<<"\nWhich planet is known as the Red Planet?";
cout<<"\n(a)Venus"<<"\t(b)Jupiter";
cout<<"\n(c)Mars"<<"\t(d)Saturn";
char rs[]="c";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y' || w=='y')
{
flag++;
s2.fifty14();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=5000000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
s2.ques15();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}
//************** QUESTION 15
void quiz2::ques15()
{
clrscr();
cout<<"\nWhich is the largest ocean in the world?";
cout<<"\n(a)Atlantic"<<"\t(b)Indian";
cout<<"\n(c)Pacific"<<"\t(d)Arctic";
char rs[]="c";
cout<<"\nDO YOU WANT 50/50 LIFELINE (Y/N) ";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s2.fifty15();
}
cout<<"\n Please give your answer ";
cin>>ans;
strlwr(ans);
t=strcmp(ans,rs);
if(t==0)
{
pts=10000000;
gotoxy(50,22);
cout<<" YOUR SCORE IS :- "<<pts;
cout<<"\n\n\t\t CONGRATULATIONS YOU HAVE WON THE GAME ";
getch();
}
else
{
cout<<"\n\t\t WRONG ANSWER \n\t\t BETTER LUCK NEXT TIME ";
cout<<"\n YOUR SCORE IS :- "<<pts;
getch();
}
}