0% found this document useful (0 votes)
50 views

C++ Quiz Code Project

This C++ program contains a quiz with multiple choice questions to test the user's general knowledge. It prompts the user to enter their name and then asks 12 multiple choice questions, tracking the user's score. After all the questions, it provides feedback on the user's performance based on their final score.

Uploaded by

MS
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

C++ Quiz Code Project

This C++ program contains a quiz with multiple choice questions to test the user's general knowledge. It prompts the user to enter their name and then asks 12 multiple choice questions, tracking the user's score. After all the questions, it provides feedback on the user's performance based on their final score.

Uploaded by

MS
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

#include<iostream.

h>
#include<conio.h>
void main()
{
clrscr();
int x,y,z;
x=y=z=0;
char ch1[100],ch2,ch3,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11;
cout<<" Enter Your Name";
cin>>ch1;
clrscr();
cout<<" Welcome "<<ch1<<"QUIZ TIME";
cout<<"Enter answer in form of �a','b' and'c'only.";
cout<<"What is the capital of Russia? \na.Moscow\nb.Sydney\nc.Mecca";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"Which is the hobby recognized by the United
Nations?\na.Writng\nb.Dancing\nc.Ham Radio";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"Which is the highest mountain in
Europe?\na.Mt.Kilimanjaro\nb.Mt.Elbruz\nc.Mt.Everest";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"Which is the oldest sport in the
world?\na.Wrestling\nb.Archery\nc.Basketball";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"What is the normal duration of Hockey game?\na.70mins\nb.45,ins\nc.90mins";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"When did partiton of Bengal happened?\na.1905\nb.1858\nc.1809";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"Phobos is the moon of which planet?\na.Jupiter\nb.Mars\nc.Neptune";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"Who is the writer of Inida's National Anthem?\na.Rehman
Shafiq\nb.Rabindranath Tagore\nc.Heba Noor";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"Who is the current chief minister of gujarat?\na.Vijay Rupani\nb.Mamata
Banjerjee\nc.Arvind Kejrival";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
cout<<"How many members aare there in United Nations?\na.180\nb.155\nc.193";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
getch();
clrscr();
if(x==100)
cout<<"You're doing it again.Sure";
if(x==90)
cout<<"wow its awesome";
if(x==80)
cout<<"You are intelligent.";
if(50==x||x==70||x==60)
cout<<"You are average.Your Score is "<<x<<"Try Next time";
else if(x<=40)
cout<<"Try hard.Don't lose hope";
getch();
}

You might also like