c++ class 12 cbse quiz programming (compiled using turbo c++)
TRANSCRIPT
The Partial fulfillment of Computer Science course
Project Work on Quiz Programming
Submitted By Submitted To: ________ ______ (Computer Teacher)
Acknowledgement
I am very thankful to my school who provided me the opportunity to prepare a project and enhancing my practical skill s regarding business firm. I am equally thankful to my teacher, Mr. _____________. He gave me moral support and guided me in different matters regarding the topic. He had been very kind and clearing my doubts. Last but not the least, I would like to thank my parents who helped me in gathering different information, collecting data and guiding me time in making this project.I’d like to recognize these special people for providing me in every manner to make this project a unique and success.
//*******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;
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 game:-“;
gets(name);
cout<<”\n Enter 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;
case2:s2.set2();
break;
default:cout<<”\aError”;
}
getch();
}
//************END MAIN************
//************SET 1*************
void quiz::set1()
{
clrscr();
cout<<”\nThis is your eligibility question”;
cout<<”\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 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 ONE IS CORRECT.YOU”;
cout<<”\n HAVE TO GIVE THE CORRECT ANSWER.WRONG ANSWER MEANS YOU “;
cout<<”\n FINISH THE GAME THERE ONLY”;
cout<<”\n ********YOU CAN TAKE ONLY THREE HELP LINES*****”;
cout<<”\n\n\n PRESS ENTER TO START THE GAME”;
getch();
s1.ques1();
}
else
{
cout<<”a\ UNSUCCESSFUL \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:-“<<pts;
cout<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques2();
}
else
{
cout<<”\a UNSUCCESSFUL\a”;
getch();
}
}
void quiz::fifty1()
{
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”;
}
//***********************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 Max”;
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 KEYY FOR THE NEXT QUESTION”;
getch();
s1.ques3();
}
else
{
cout<<”\aUNSUCCESSFUL\a;
}
}
void quiz::fifty2()
{
clrscr();
cout<<”\n Who has written the book ‘THE 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)Williamm Wordsworth”<<”\t(d)Charles Darwin”;
char rs[]=”a”;
cout<<”\n DO YOU WANT 50-5- 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques4();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty3()
{
clrscr();
cout<<”\n Who has written the book ‘ONE LIFE’?”;
cout<<”\n (a) Christian Barnard”<<”\n (c) William Wordsworth”;
}
*******************QUESTION 4************************
void quiz::ques4()
{
clrscr();
cout<<”\n Which game is associated with ‘YONEX CUP’?”;
cout<<”\n (a) Golf”<<:\t(b)Baseball”;
cout<<”\n (c) Yatch Racing”<<”\t(d)Badminton”;
char rs[]=”d”;
if(flag&It;3)
{
flag++;
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques5();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty4()
{
clrscr();
cout<<”\n Which game is associate with ‘YONEX CUP’?”;
cout<<”\n(a) Golf”<<”\t(d)Badminton”;
}
*******************QUESTION 5********************
void quiz::ques5()
{
clrscr();
cout<<”\n Who invented ‘Mechanical Clock”?;
cout<<”\n (a) C.Huygens”<<”\t(b)Samuel Colt”;
cout<<”\n ©Hsing and Ling-Tsan”<<”\t(d) Wilhelm Roentgen”;
char rs[]=”c”;
if(flag&It;3)
{
cout<<”\n DO 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=5000;
gotoxy(50,22)
cout<<”YOUR SCORE IS:-“<<pts;
cout<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques5();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty5();
{
clrscr();
cout<<”\n Who invented ‘MECHANICAL CLOCK’?”;
cout<<”\n\t(b)Samuel Colt”<<”\n(c)Hsing and Ling-Tsan”;
}
****************QUESTION 6*****************
void quiz::ques6()
{
clrscr();
cout<<”\n Who invented ‘ELECTRIC RAZOR’?”;
cout<<”\n (a)K.G.Gillet”<<”\t(b)Viscose Co.”;
cout<<”\n(c)L.C.Young”<<”\t(d)Col.J.Schick”;
char rs[]=”d”;
if(flag&It;3)
{
cout<<”\n DO 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=5000;
gotoxy(50,22)
cout<<”YOUR SCORE IS:-“<<pts;
cout<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques7();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty6()
{
clrscr();
cout<<”\n Who invented ‘ELECTRIC CLOCK’?”;
cout<<”\n\t(b)Viscose Co.”<<”\n\t(d)Col.J.Schick”;
}
******************QUESTION 7****************
void quiz::ques7()
{
clrscr();
cout<<”\n Who invented ‘WATERPROOF RUBBER’?”;
cout<<”\n(a)A.Catlin”<<”\t(b)Charles GoodYear”;
cout<<”\n(c)J.Harrison”<<”\t(d)Charles Macintosh”;
char rs[]=”d”;
if(flag&It;3)
{
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques8();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty7()
{
clrscr();
cout<<”Who invented ‘WATERPROOF RUBBER’?”;
cout<<”\n\t(b)Charles GoodYear”<<”\n\t(d)Charles Macintosh”;
}
******************QUESTION 8****************
void quiz::ques8()
{
clrscr();
cout<<”\n Where the disease named ‘GLAUCOMA’ is affected in the body’?”;
cout<<”\n(a)Skin”<<”\t(b)Eyes”;
cout<<”\n(c)Spleen”<<”\t(d)blood”;
char rs[]=”d”;
if(flag&It;3)
{
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques9();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty8()
{
clrscr();
cout<<”Where is the disease named ‘GLAUCOMA’ is affected in the body’?”;
cout<<”\n\t(b)Eyes”<<”\n\t(c)Spleen”;
}
******************QUESTION 9****************
void quiz::ques9()
{
clrscr();
cout<<”\n When was Abraham Lincoln re-elected as president of USA’?”;
cout<<”\n(a)1864”<<”\t(b)1814”;
cout<<”\n(c)1865”<<”\t(d)1819”;
char rs[]=”d”;
if(flag&It;3)
{
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s1.ques10();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty9()
{
clrscr();
cout<<”When was Abraham Lincoln re-elected as the president of USA’?”;
cout<<”\n\t(a)1864”<<”\n\t(c)1865”;
}
******************QUESTION 10****************
void quiz::ques10()
{
clrscr();
cout<<”\n Who invented ‘TELEPHONE’?”;
cout<<”\n(a)Albert Einstein”<<”\t(b)Graham Bell”;
cout<<”\n(c)J.Harrison”<<”\t(d)Charles Macintosh”;
char rs[]=”d”;
if(flag&It;3)
{
cout<<”\n DO 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;
cout<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
clrscr();
cout<<”\n************************************************”;
cout<<”\n CONGRATS YOU HAVE COMPLETED”;
cout<<”\n*****************************”;
}
else
{
cout<<”UNSUCCESSFULL\a”;
}
}
s1.ques8();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz::fifty10()
{
clrscr();
cout<<”Who invented ‘TELEPHONE’?”;
cout<<”\n\t(a)Albert Einstein”<<”\n\t(b)Graham Bell”;
}
//*****************End Of Set 1*****************
//*****************SET 2******************
void quiz::set2()
{
clrscr();
cout<<”\n This is your eligibility question”;
cout<<”\n\n\n The provisional Government Of India was formet at?”;
cout<<”\n(a)Tokyo”<<”\t(b)Singapore”;
cout<<”\n(c)Jakarta”<<”\t(d)Kuala Lumpur”;
char rs[]=”b”;
cout<<”\nEnter you 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 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 ONE IS CORRECT.YOU”;
cout<<”\n HAVE TO GIVE THE CORRECT ANSWER.WRONG ANSWER MEANS YOU “;
cout<<”\n FINISH THE GAME THERE ONLY”;
cout<<”\n ********YOU CAN TAKE ONLY THREE HELP LINES*****”;
cout<<”\n\n\n PRESS ENTER TO START THE GAME”;
getch();
s2.ques1();
}
else
{
cout<<”a\ UNSUCCESSFUL \a”;
getch();
}
}
******************QUESTION 1****************
void quiz2::ques1()
{
clrscr();
cout<<”\n The British Viceroy who took a no. of measures for preserving ”;
cout<<”\n ancient buildings and monuments in India was…?”;
cout<<”\n(a)Lord Rippon”<<”\t(b)Lord Curzon”;
cout<<”\n(c)Lord Minton”<<”\t(d)Lord Irwin”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques2();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty1()
{
clrscr();
cout<<”\n The British Viceroy who took a no. of measures”;
cout<<”\n preserving ancient buildings and monuments in India was…?”;
cout<<”\n\t(b)Lord Curzon”<<”\n\t(d)Lord Irwin”;
}
******************QUESTION 2****************
void quiz2::ques2()
{
clrscr();
cout<<”\n The name of 3rd bird sanctuary at bharatpur is..??”;
cout<<”\n(a)Bhansrod Garh Sanctuary”<<”\t(b)Darrah Sanctuary”;
cout<<”\n(c)Ghana Sanctuary”<<”\t(d)Ghatprabha Sanctuary”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques3();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty2()
{
clrscr();
cout<<”The name of the 3rd bird sanctuary if bharatpur is…?”;
cout<<”\n\t(a)Bhansrod Garh Sanctuary”<<”\n\t(c)Ghana Sanctuary”;
}
******************QUESTION 3****************
void quiz2::ques3()
{
clrscr();
cout<<”\n Who is known as the ‘Father of Geometry’ ?”;
cout<<”\n(a)Kepler”<<”\t(b)Euclid”;
cout<<”\n(c)Pythagora”<<”\t(d)Newton”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO YOU WANT 50-50 LIFELINE(Y/N)”;
cin>>w;
if(w==’y’||w==’Y’)
{
flag++;
s2.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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques4();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty3()
{
clrscr();
cout<<”Who is known as the ‘Father Of Geometry’?”;
cout<<”\n\t(b)Euclid”<<”\n\t(c)Pythagoras”;
}
******************QUESTION 4****************
void quiz2::ques4()
{
clrscr();
cout<<”\n How many centuries did Sachin score against Kenya?”;
cout<<”\n(a)2”<<”\t(b)3”;
cout<<”\n(c)6”<<”\t(d)4”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques5();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty4()
{
clrscr();
cout<<”\n How many centuries did Sachin score against Kenya?”;
cout<<”\n\t(c)6”<<”\n\t(d)4”;
}
******************QUESTION 5****************
void quiz2::ques5()
{
clrscr();
cout<<”\The 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 bright disease”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques5();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty6()
{
clrscr();
cout<<”\n The disease caused by bacteria in apple is…?”;
cout<<”\n\t(c)Wild fire disease”<<”\n\t(d)Fire blight disease”;
}
******************QUESTION 6****************
void quiz2::ques6()
{
clrscr();
cout<<”\Blood calcium level can be increased by administration of..?”;
cout<<”\n(a)Glucagon”<<”\t(b)Parathormone”;
cout<<”\n(c)Thyroxine”<<”\t(d)Calcitonin”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques7();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty6()
{
clrscr();
cout<<”\n Blood calcium level can be increased by the administration of?”;
cout<<”\n\t(b)Parathormone”<<”\n\t(c)Thyroxine”;
}
******************QUESTION 7****************
void quiz2::ques7()
{
clrscr();
cout<<”\n An element E from a solid oxide which dissolves in water to ?”;
cout<<”\n give an acidic solution, the element E is…?”;
cout<<”\n(a)H”<<”\t(b)P”;
cout<<”\n(c)Mg”<<”\t(d)N”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques8();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty7()
{
clrscr();
cout<<”\n An element E from a solid oxide which dissolves in water?”;
cout<<”\n to give an acidic solution, the element E is…?”
cout<<”\n\t(c)6”<<”\n\t(d)4”;
}
******************QUESTION 8****************
void quiz2::ques8()
{
clrscr();
cout<<”\n Ezra Cup is associated with which sports?”;
cout<<”\n(a)Rowing”<<”\t(b)Golf”;
cout<<”\n(c)Air races”<<”\t(d)Polo”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques9();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty8()
{
clrscr();
cout<<”\n Ezra Cup is associated with which sports?”;
cout<<”\n\t(c)Air races”<<”\n\t(d)Polo”;
}
******************QUESTION 9****************
void quiz2::ques9()
{
clrscr();
cout<<”\n The headquarters of ILO is located in…?”;
cout<<”\n(a)Geneve”<<”\t(b)The hague”;
cout<<”\n(c)New York”<<”\t(d)Rome”;
char rs[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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<<”\n PRESS ANY KEY FOR THE NEXT QUESTION”;
getch();
s2.ques10();
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty9()
{
clrscr();
cout<<”\n The headquarters of ILO is located in…?”;
cout<<”\n\t(a)”<<”\n\t(d)The Hague”;
}
******************QUESTION 10****************
void quiz2::ques10()
{
clrscr();
cout<<”\n What 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[]=”d”;
if(flag&It;3)
{
flag++
cout<<”\n DO 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;
clrscr();
cout<<”/n******************************************”;
cout<<”/nCONGRATULATIONS YOU WIN”;
cout<<”\n********************************”;
}
else
{
cout<<”\a UNSUCCESSFULL\a”;
}
}
void quiz2::fifty10()
{
clrscr();
cout<<”\n What is October 8th celebrated for..?”;
cout<<”\n\t(c)Airforce Day”<<”\n\t(d)Navy Day”;
}
//****************END OF SET 2*******************
//***************END OF QUIZ*******************
Bibliography google.com Wikipedia.com Together With Book meritnation.com
THE END