/* Reena Rankawat */
#include<iostream.h>
#include<conio.h>
void main(void)
{
char name[50],ch[11];
int x;
clrscr();
do
{
x=0;
cout<<"\n Welcome to KBC";
cout<<"\n\n Enter your name: ";
cin>>name;
cout<<"\n Enter answer in form of 'a','b' and'c'only.";
cout<<"\n Q1.What is called as ' THE HOLY LAND'?";
cout<<"\n a.Jerusalem";
cout<<"\n b.Mathura";
cout<<"\n c.Mecca";
cin>>ch[1];
if(ch[1]=='a')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer.";
goto abc;
}
cout<<"\n Q2.What is called as ' THE ROOF OF THE WORLD'?";
cout<<"\n a.Nepal";
cout<<"\n b.Rome";
cout<<"\n c.Tibet";
cin>>ch[2];
if(ch[2]=='c')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer.";
goto abc;
}
cout<<"\n Q3.What is called as ' THE LAND OF RISING SUN'?";
cout<<"\n a.Chicago";
cout<<"\n b.Japan";
cout<<"\n c.Tibet";
cin>>ch[3];
if(ch[3]=='b')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\nSorry wrong answer.";
goto abc;
}
cout<<"\n Q4.What is called as ' THE GIFT OF NILE'?";
cout<<"\n a.Chicago";
cout<<"\n b.Egypt";
cout<<"\n c.Africa";
cin>>ch[4];
if(ch[4]=='b')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"Sorry wrong answer.";
goto abc;
}
cout<<"\n Q5.What is called as ' THE LAND OF MIDNIGHT SUN'?";
cout<<"\n a.Norway";
cout<<"\n b.Japan";
cout<<"\n c.Australia";
cin>>ch[5];
if(ch[5]=='a')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer.";
goto abc;
}
cout<<"\n Q6.What is called as ' THE LAND OF THUNDERBOLT'?";
cout<<"\n a.Bhutan";
cout<<"\n b.Canada";
cout<<"\n c.Arab";
cin>>ch[6];
if(ch[6]=='a')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer.";
goto abc;
}
cout<<"\n Q7.What is called as ' THE WINDY CITY?";
cout<<"\n a.Jerusalem";
cout<<"\n b.Japan";
cout<<"\n c.Chicago";
cin>>ch[7];
if(ch[7]=='c')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer.";
goto abc;
}
cout<<"\n Q8.What is called as ' THE LAND OF WHITE ELEPHANTS'?";
cout<<"\n a.Bangladesh";
cout<<"\n b.Thailand";
cout<<"\n c.India";
cin>>ch[8];
if(ch[8]=='b')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer.";
goto abc;
}
cout<<"\n Q9.What is called as ' THE CITY OF SEVEN HILLS'?";
cout<<"\n a.Rome";
cout<<"\n b.Nilgiri Hills";
cout<<"\n c.Tibet";
cin>>ch[9];
if(ch[9]=='a')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer";
goto abc;
}
cout<<"\n Q10.What is called as ' THE DARK CONTIENENT'?";
cout<<"\n a.Asia";
cout<<"\n b.Australia";
cout<<"\n c.Africa";
cin>>ch[10];
if(ch[10]=='c')
{
x=x+10;
cout<<"\n Good Job.";
cout<<"\n Your score is "<<x;
}
else
{
cout<<"\n Sorry wrong answer.";
goto abc;
}
abc:
if(x==100)
{
cout<<"\n No cheating...... "<<name<<" you have done this earlier also.";
break;
}
if(x==90)
{
cout<<"\n "<<name<<" you are extremely intelligent.";
cout<<"\n Your Score is 90";
}
if(x==80)
{
cout<<"\n "<<name<<" you are intelligent.";
cout<<"\n Your Score is 80";
}
if(50==x||x==70||x==60)
{
cout<<"\n "<<name<<" you are average";
cout<<"\n Your Score is "<<x<<".";
cout<<"\n Better luck next time";
}
else
if(x<=40)
cout<<"\n No use........ Not even 5 questions right";
cout<<"\n\n\n Do you want to play again?(y/n)";
cin>>ch[11];
}
while(ch[11]=='Y'||ch[11]=='y');
getch();
}
reenarankawat 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Lucaci Andrew 140 Za s|n
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.