Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream.h>
- #include<string.h>
- #include<stdio.h>
- #include<conio.h>
- #include<iomanip.h>
- #include<fstream.h>
- using namespace std;
- fstream s1;
- fstream s2;
- class quiz
- {
- int amount,total,gkscore,mathscore,option,i,a,score;
- char phoneno[25];
- char name[25],place[30];
- public:
- void get_info();
- void rules();
- int gkscores();
- int mathscores();
- void gk(int i);
- void maths(int i);
- void display();
- };
- void quiz::get_info()
- {
- cout<<"*****************************INFORMATION****************************************\n";
- cout<<"\nBefore starting we would like to know some informations about you."<<endl;
- cin.get();
- cout<<"Your name:"<<endl;
- gets(name);
- cout<<"Your place:"<<endl;
- gets(place);
- cout<<"Your phone number:"<<endl;
- cin>>phoneno;
- cout<<"********************************************************************************\n";
- }
- void quiz::display()
- {
- cout<<"*****************************INFORMATION****************************************\n";
- puts(name);
- puts(place);
- cout<<phoneno<<endl;
- }
- void quiz::rules()
- {
- cout<<"*******************************RULES********************************************\n";
- cout<<"1.In this game you will be given the opportunity to choose from any \n three subjects: "<<endl;
- cout<<"i.GENERAL KNOWLEDGE\tii.MATHEMATICS\n"<<endl;
- cout<<"2.For every correct anewer you will get 10 points and for every wrong \n answer minus 2 points\n"<<endl;
- cout<<"********************************************************************************\n";
- }
- void quiz::gk( int i)
- {
- a=i%3;
- switch(a)
- {
- case 0:
- gkscore=0;
- cout<<"Q.1 :"<<endl<<endl;
- cout<<"What was the name of the first U.S civilian ship to be sunk by a\n german submarine in World War 1?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ATIK *"<<setw(5)<<"* MOUNT HOOD *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* POLLUX *"<<setw(5)<<"* LUSITANIA *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Lusitania"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.2 :"<<endl<<endl;
- cout<<"Epsom (England) is the place associated with?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Horse racing *"<<setw(5)<<"* Polo *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* SNOOKER *"<<setw(5)<<"* SHOOTING *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Horse racing"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.3 :"<<endl<<endl;
- cout<<"Golf player Vijay Singh belongs to which country?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* USA *"<<setw(5)<<"* FIJI *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* INDIA *"<<setw(5)<<"* UK *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Fiji"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.4 :"<<endl<<endl;
- cout<<"Each year World Red Cross and Red Crescent Day is celebrated on?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* May 8 *"<<setw(5)<<"* May 18 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* June 8 *"<<setw(5)<<"* June 18 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: May 8"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.5 :"<<endl<<endl;
- cout<<"Guwahati High Court is the judicature of?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Nagaland *"<<setw(5)<<"* Arunachal Pradesh *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Assam *"<<setw(5)<<"* None of the above *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Non of the above"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.6 :"<<endl<<endl;
- cout<<"Friction can be reduced by changing from?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Sliding to rolling *"<<setw(5)<<"* Rolling to sliding *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Dynamic to static *"<<setw(5)<<"* Non of the abovE *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Sliding to rolling"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.7 :"<<endl<<endl;
- cout<<"Film and TV institute of India is located at?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Rajkot (Gujarat) *"<<setw(5)<<"* Pune (Maharashtra) *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Pimpri(Maharashtra)*"<<setw(5)<<"* Perambur(Tamilnadu)*";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Pune(Maharashtra)"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.8 :"<<endl<<endl;
- cout<<"The power to decide an election petition is vested in the?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Parliament *"<<setw(5)<<"* Supreme Court *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* High courts *"<<setw(5)<<"* Election Commission*";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: High Courts"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.9 :"<<endl<<endl;
- cout<<"The members of Lok Sabha hold office for a term of"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 4 years *"<<setw(5)<<"* 5 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 6 years *"<<setw(5)<<"* 3 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: 5 years"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.10 :"<<endl<<endl;
- cout<<"The Centre for Cellular and Molecular Biology is situated at?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Patna *"<<setw(5)<<"* Jaipur *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Hyderabad *"<<setw(5)<<"* New Delhi *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Hyderabad"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- break;
- case 1:
- gkscore=0;
- cout<<"Q.1 :"<<endl<<endl;
- cout<<"The minimum age to qualify for election to the Lok Sabha is"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 25 years *"<<setw(5)<<"* 21 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 18 years *"<<setw(5)<<"* 35 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: 25 years"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.2 :"<<endl<<endl;
- cout<<"The minimum age of the voter in India is?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 15 years *"<<setw(5)<<"* 18 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 21 years *"<<setw(5)<<"* 25 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: 18 years"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.3 :"<<endl<<endl;
- cout<<"Wadia Institute of Himalayan Geology is located at?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Delhi *"<<setw(5)<<"* Shimla *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Dehradun *"<<setw(5)<<"* Kulu *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Dehradun"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.4 :"<<endl<<endl;
- cout<<"The Indian Institute of Science is located at?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Kerala *"<<setw(5)<<"* Nanded *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* New Delhi *"<<setw(5)<<"* Bangalore *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Bangalore"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.5 :"<<endl<<endl;
- cout<<"Which scientist discovered the radioactive element radium??"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Isaac Newton *"<<setw(5)<<"* Albert Einstein *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Benjamin Franklin *"<<setw(5)<<"* Marie Curie *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Marie Curie"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.6 :"<<endl<<endl;
- cout<<"What now-ubiquitous device was invented by Zenith engineer Eugene Polley in 1955??"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Microwave oven *"<<setw(5)<<"* Remote control *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* VCR *"<<setw(5)<<"* Calculator *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Remote control"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.7 :"<<endl<<endl;
- cout<<"January 15 is celebrated as the?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Republic Day *"<<setw(5)<<"* Ugadhi *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Teachers'Day *"<<setw(5)<<"* Army Day *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Army Day"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.8 :"<<endl<<endl;
- cout<<"The 'Char Minar' is in?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Ahmedabad *"<<setw(5)<<"* Hyderabad *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Delhi *"<<setw(5)<<"* Sikri *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Hyderabad"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.9 :"<<endl<<endl;
- cout<<"Where is the National Institute of Virology situated??"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Pune *"<<setw(5)<<"* Delhi *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Kolkatta *"<<setw(5)<<"* Madras *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Pune"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.10 :"<<endl<<endl;
- cout<<"Nuclear sizes are expressed in a unit named?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Fermi *"<<setw(5)<<"* angstrom *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* newton *"<<setw(5)<<"* tesla *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Fermi"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- break;
- case 2:
- gkscore=0;
- cout<<"Q.1 :"<<endl<<endl;
- cout<<"What was the name of the first U.S civilian ship to be sunk by a\n german submarine in World War 1?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ATIK *"<<setw(5)<<"* MOUNT HOOD *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* POLLUX *"<<setw(5)<<"* LUSITANIA *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Lusitania"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.2 :"<<endl<<endl;
- cout<<"Epsom (England) is the place associated with?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Horse racing *"<<setw(5)<<"* Polo *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* SNOOKER *"<<setw(5)<<"* SHOOTING *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Horse racing"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.3 :"<<endl<<endl;
- cout<<"Golf player Vijay Singh belongs to which country?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* USA *"<<setw(5)<<"* FIJI *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* INDIA *"<<setw(5)<<"* UK *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Fiji"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.4 :"<<endl<<endl;
- cout<<"Each year World Red Cross and Red Crescent Day is celebrated on?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* May 8 *"<<setw(5)<<"* May 18 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* June 8 *"<<setw(5)<<"* June 18 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: May 8"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.5 :"<<endl<<endl;
- cout<<"Guwahati High Court is the judicature of?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Nagaland *"<<setw(5)<<"* Arunachal Pradesh *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Assam *"<<setw(5)<<"* None of the above *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Non of the above"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.6 :"<<endl<<endl;
- cout<<"The minimum age to qualify for election to the Lok Sabha is"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 25 years *"<<setw(5)<<"* 21 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 18 years *"<<setw(5)<<"* 35 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: 25 years"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.7 :"<<endl<<endl;
- cout<<"The minimum age of the voter in India is?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 15 years *"<<setw(5)<<"* 18 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 21 years *"<<setw(5)<<"* 25 years *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: 18 years"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.8 :"<<endl<<endl;
- cout<<"Wadia Institute of Himalayan Geology is located at?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Delhi *"<<setw(5)<<"* Shimla *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Dehradun *"<<setw(5)<<"* Kulu *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Dehradun"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.9 :"<<endl<<endl;
- cout<<"The Indian Institute of Science is located at?"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Kerala *"<<setw(5)<<"* Nanded *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* New Delhi *"<<setw(5)<<"* Bangalore *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Bangalore"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- cout<<"Q.10 :"<<endl<<endl;
- cout<<"Which scientist discovered the radioactive element radium??"<<endl;
- cout<<"your options are:"<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* Isaac Newton *"<<setw(5)<<"* Albert Einstein *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* Benjamin Franklin *"<<setw(5)<<"* Marie Curie *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- gkscore=gkscore+10;
- cout<<"Your score: "<<gkscore<<endl<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is: Marie Curie"<<endl;
- cout<<"-2 points"<<endl;
- gkscore=gkscore-2;
- cout<<"Your score: "<<gkscore<<endl;
- }
- }
- }
- void quiz::maths(int i)
- {
- a=i%3;
- switch(a)
- {
- case 0:
- mathscore=0;
- cout<<"Q.1 :"<<endl<<endl;
- cout<<"A clock strikes once at 1 o'clock, twice at 2 o'clock, thrice at\n 3 o'clock and so on.How many times will it strike in 24 hours?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 78 *"<<setw(5)<<"* 136 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 156 *"<<setw(5)<<"* 196 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore= mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:156"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.2 :"<<endl<<endl;
- cout<<"What is the next number in this sequence?\n26, 29, 32, ___"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 35 *"<<setw(5)<<"* 36 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 32 *"<<setw(5)<<"* 33 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:35"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.3 :"<<endl<<endl;
- cout<<"A rectangle has width 2.5 m and area is 20,000 square centimeters.\nWhat is its area?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 80m *"<<setw(5)<<"* 100m *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 40cm *"<<setw(5)<<"* 80cm *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:35"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.4 :"<<endl<<endl;
- cout<<"Two fair cubical dice are thrown at the same time and their\n scores added together.What is the probability that the sum of the scores\n is greater than 7?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 1/3 *"<<setw(5)<<"* 13/36 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 7/8 *"<<setw(5)<<"* 5/12 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:5/12"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.5 :"<<endl<<endl;
- cout<<"What is the mean of the set of numbers {3, 9, 15, 6, 18, 12, 33, 24, 15}?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 8 *"<<setw(5)<<"* 10 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 15 *"<<setw(5)<<"* 12 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:15"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.6 :"<<endl<<endl;
- cout<<"ABCD is a quadrilateral with A=(-5,-1), B=(0,4), C=(1,-3), and \nD=(-4,-8).Without drawing the quadrilateral,decide which one of the following\n most accurately describes ABCD:"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* A RECTANGLE *"<<setw(5)<<"* A RHOMBUS *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* A PARALLELOGRAM *"<<setw(5)<<"* A TRAPEZOID *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:A Rhombus"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.7 :"<<endl<<endl;
- cout<<"Which one of the following is discrete data?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* sam is 60cm long *"<<setw(5)<<"* sam weighs 60kg *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* sam has 2 sisters *"<<setw(5)<<"* sam ran 5m in 0.2s *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:35"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.8 :"<<endl<<endl;
- cout<<"If 4x + 3y = 18xy and 2x - 5y + 4xy = 0, then what are the values\n of x and y respectively?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* -1/2,-1/3 *"<<setw(5)<<"* -1,-3 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 1/2,1/3 *"<<setw(5)<<"* 1/4,1/3 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\t1/2,1/3"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.9 :"<<endl<<endl;
- cout<<"What three positive numbers give the same result when multiplied\n and added together"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 1,2 and 3 *"<<setw(5)<<"* 1,8 and 6 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 1,3 and 9 *"<<setw(5)<<"* 1,5 and 4 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\t1,2 and 3"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.10 :"<<endl<<endl;
- cout<<"Who invented zero?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ARYABHATTA *"<<setw(5)<<"* BRAHMAGUPTA *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* EUCLID *"<<setw(5)<<"* C.V RAMAN *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\tAryabhatta"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- break;
- case 1:
- mathscore=0;
- cout<<"Q.1:"<<endl<<endl;
- cout<<"What kind of sequence is this? \n1, 10, 100, 1,000, ..."<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ARITHMETIC *"<<setw(5)<<"* GEOMETRIC *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* BOTH *"<<setw(5)<<"* NONE OF THE ABOVE *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\tGeometric"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.2 :"<<endl<<endl;
- cout<<" In my row in the theatre the seats are numbered consecutively\n from T1 to T50. I am sitting in seat T17 and you are sitting in seat T39.\n How many seats are there between us?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 20 *"<<setw(5)<<"* 21 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 22 *"<<setw(5)<<"* 23 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:21"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.3 :"<<endl<<endl;
- cout<<"How many prime numbers are there in the list \n1, 12, 123, 1234, 12 345, 123 456 ?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 1 *"<<setw(5)<<"* 2 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* none *"<<setw(5)<<"* 5 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\tNone"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.4 :"<<endl<<endl;
- cout<<"A function machine changes 49 to 98 and changes 26 to 52.\n What function is the machine carrying out on each number?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ADDING 49 *"<<setw(5)<<"* ADDING 26 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* DOUBLING NUMBER *"<<setw(5)<<"* NONE OF ABOVE *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\nDOUBLING NUMBER"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.5 :"<<endl<<endl;
- cout<<"Whose theorem states that ‘a square on the hypotenuse is equal\n to the sum of the squares on the other two sides?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ARYABHATTA *"<<setw(5)<<"* PYTHAGORAS *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* EUCLID *"<<setw(5)<<"* NONE OF THE ABOVE *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\tPYTHAGORAS"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.6 :"<<endl<<endl;
- cout<<"What is missing out of the trio. Sine, Cosine and…?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* TANGENT *"<<setw(5)<<"* COT *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* COSEC *"<<setw(5)<<"* SEC *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\nTangent"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.7 :"<<endl<<endl;
- cout<<"If a bag of 30 sweets weighs 20g, how many sweets would weigh 1kg?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 1000 *"<<setw(5)<<"* 500 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 2000 *"<<setw(5)<<"* 1500 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:1500"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.8 :"<<endl<<endl;
- cout<<"If 4x + 3y = 18xy and 2x - 5y + 4xy = 0, then what are the values\n of x and y respectively?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* -1/2,-1/3 *"<<setw(5)<<"* -1,-3 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 1/2,1/3 *"<<setw(5)<<"* 1/4,1/3 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\t1/2,1/3"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.9 :"<<endl<<endl;
- cout<<"What three positive numbers give the same result when multiplied\n and added together"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 1,2 and 3 *"<<setw(5)<<"* 1,8 and 6 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 1,3 and 9 *"<<setw(5)<<"* 1,5 and 4 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\t1,2 and 3"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.10 :"<<endl<<endl;
- cout<<"The geometric compass was invented by?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ARYABHATTA *"<<setw(5)<<"* GALILEO *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* EUCLID *"<<setw(5)<<"* C.V RAMAN *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\tGalileo"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- break;
- case 2:
- mathscore=0;
- cout<<"Q.1 :"<<endl<<endl;
- cout<<"If it takes 3 men 2 hours to dig a hole, how long will it theoretically take one man?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 2 HOURS *"<<setw(5)<<"* 4 HOURS *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 6 HOURS *"<<setw(5)<<"* 8 HOURS *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\n6 HOURS"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.2 :"<<endl<<endl;
- cout<<"How many prime numbers are there in the list \n1, 12, 123, 1234, 12 345, 123 456 ?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 5 *"<<setw(5)<<"* 3 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 2 *"<<setw(5)<<"* NONE *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\nNone"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.3 :"<<endl<<endl;
- cout<<"A rectangle has width 2.5 m and area is 20,000 square centimeters.\nWhat is its area?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 80m *"<<setw(5)<<"* 100m *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 40cm *"<<setw(5)<<"* 80cm *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:35"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.4 :"<<endl<<endl;
- cout<<"What is the mean of the set of numbers {3, 9, 15, 6, 18, 12, 33, 24, 15}?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 12 *"<<setw(5)<<"* 33 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 18 *"<<setw(5)<<"* 15 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==4)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:15"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.5 :"<<endl<<endl;
- cout<<"The roman numeral XXIV is how many?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 8 *"<<setw(5)<<"* 24 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 15 *"<<setw(5)<<"* 12 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:24"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.6 :"<<endl<<endl;
- cout<<"How many seconds are there in four and a half minutes?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 60 *"<<setw(5)<<"* 30 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 120 *"<<setw(5)<<"* 270 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==2)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:270"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.7 :"<<endl<<endl;
- cout<<"Which one of the following is discrete data?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* sam is 60cm long *"<<setw(5)<<"* sam weighs 60kg *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* sam has 2 sisters *"<<setw(5)<<"* sam ran 5m in 0.2s *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:35"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.8 :"<<endl<<endl;
- cout<<"If 4x + 3y = 18xy and 2x - 5y + 4xy = 0, then what are the values\n of x and y respectively?"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* -1/2,-1/3 *"<<setw(5)<<"* -1,-3 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 1/2,1/3 *"<<setw(5)<<"* 1/4,1/3 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\t1/2,1/3"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.9 :"<<endl<<endl;
- cout<<"What three positive numbers give the same result when multiplied\n and added together"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* 1,2 and 3 *"<<setw(5)<<"* 1,8 and 6 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* 1,3 and 9 *"<<setw(5)<<"* 1,5 and 4 *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==1)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\t1,2 and 3"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- cout<<"Q.10 :"<<endl<<endl;
- cout<<"Who invented geometry"<<endl;
- cout<<"your options are:"<<endl<<endl;
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 1 *"<<setw(5)<<"* OPTION 2 *";
- cout<<"\n* ARYABHATTA *"<<setw(5)<<"* BRAHMAGUPTA *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<"\n* OPTION 3 *"<<setw(5)<<"* OPTION 4 *";
- cout<<"\n* EUCLID *"<<setw(5)<<"* C.V RAMAN *";
- cout<<"\n**********************"<<setw(5)<<"**********************";
- cout<<endl;
- cout<<"choose your option"<<endl;
- cin>>option;
- if(option==3)
- {
- cout<<"Right answer!!"<<endl;
- cout<<"+10 points"<<endl;
- mathscore=mathscore+10;
- cout<<"Your score: "<<mathscore<<endl;
- }
- else
- {
- cout<<"Wrong answer"<<endl;
- cout<<"The correct answer is:\tEuclid"<<endl;
- cout<<"-2 points"<<endl;
- mathscore=mathscore-2;
- cout<<"Your score: "<<mathscore<<endl;
- }
- }
- }
- int quiz::gkscores()
- {
- cout<<"Final score is: "<<gkscore<<endl;
- }
- int quiz::mathscores()
- {
- cout<<"Final score is: "<<mathscore<<endl;
- }
- int main()
- {
- quiz obj;
- int choice,a=0,p,option,f,pass=12345,io;
- do
- {
- cout<<"\t\t\t\tKAUN BANEGA PROFESSIONL";
- cout<< "\n================================================================================\n\n" ;
- cout<< "\n\t\t1.Please press 1 to register\n\n" ;
- cout<< "\t\t2.Please press 2 If you are already registered and want to play \t\t the game\n\n";
- cout<< "\t\t3.Please press 3 for a access\n\n";
- cout<< "\t\t4.Please press 4 to exit\n\n" ;
- cin>>option;
- switch(option)
- {
- case 1:
- s1.open("details.dat",ios::binary|ios::out|ios::app);
- obj.get_info();
- s1.write((char *)&obj,sizeof(obj));
- s1.close();
- obj.rules();
- case 2:
- do
- {
- cout<<"Select your subject according to the corresponding number:"<<endl;
- cout<<"1.GENERAL KNOWLEDGE"<<endl<<"2.MATHEMATICS"<<endl<<"3.EXIT"<<endl;
- cin>>choice;
- //fjsdfasj
- switch(choice)
- {
- case 1:
- obj.gk(a);
- s1.open("details.dat",ios::binary|ios::out|ios::app);
- obj.gkscores();
- s1.write((char *)&obj,sizeof(obj));
- s1.close();
- a++;
- break;
- case 2:
- obj.maths(a);
- s1.open("details.dat",ios::binary|ios::out|ios::app);
- obj.mathscores();
- s1.write((char *)&obj,sizeof(obj));
- s1.close();
- a++;
- break;
- case 3:
- break;
- }
- }
- while(choice!=3);
- break;
- case 3:
- cout<<"ADMIN please enter your password\n";
- cin>>p;
- //fjsdfasj
- if(p==pass)
- {
- cout<<"***********************welcome ADMIN********************************************\n";
- s2.open("details.dat",ios::binary|ios::in);
- do
- {
- cout<<"1.General knowledge topers"<<endl;
- cout<<"2.Mathematics topers"<<endl;
- cout<<"3.Exit"<<endl;
- cin>>io;
- //fjsdfasj
- switch(io)
- {
- case 1:
- while(s2.read((char *)&obj,sizeof(obj)))
- {
- obj.display();
- obj.gkscores();
- }
- break;
- s2.close();
- break;
- case 2:
- while(s2.read((char *)&obj,sizeof(obj)))
- {
- obj.display();
- obj.mathscores();
- }
- break;
- s2.close();
- break;
- case 3:
- break;
- }
- }
- while(io!=3);
- }
- else
- {
- cout<<"Incorrect password!!!!!!\n";
- //fjsdfasj
- break;
- }
- }
- }
- while(option!=4);
- }
Add Comment
Please, Sign In to add comment