// A program on GK- Quiz
/* A Game for the Beginners to understand the concept ( higher level game similar to this is posted on this blog as Kaun Banega Crorepati) */
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
void pexit(int x)
{ char a;
cout<<"\n\n\nDo you want to exit(y/n)\t\t";
cin>>a ;
if((a=='y') || (a=='Y'))
{ cout<<"\nyour score is\t"<<x;
getch();
exit(0);
}
}
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<<"\n\n\n\n\n\n\nGuest Enter Your Name\t\t";
cin>>ch1;
clrscr();
cout<<"\n\n\n\nWelcome\t"<<ch1;
cout<<"\n\n\n\nEnter answer in form of 'a','b' and'c'only.";
cout<<"\n\n\nWhat is called as THE HOLYLAND?\n\n\n\n "<<"\na.Jerusalem\nb.Mathura\nc.Mecca\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\nWhat is called as THE ROOF OF THE WORLD?\n\n\n\n"<<"\na.Nepal\nb.Rome\nc.Tibet\n\n\n";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as THE LAND OF RISING SUN?\n\n\n\n"<<"\na.Chicago\nb.Japan\nc.Tibet\n\n\n";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as THE GIFT OF NILE?\n\n\n\n"<<"\na.Chicago\nb.Egypt\nc.Africa\n\n\n";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as THE LAND OF MIDNIGHT SUN?\n\n\n\n"<<"\na.Norway\nb.Japan\nc.Australia\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as ‘ THE LAND OF THUNDERBOLT?\n\n\n\n"<<"\na.Bhutan\nb.Canada\nc.Arab\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as ‘ THE WINDY CITY?\n\n\n\n"<<"\na.Jerusalem\nb.Japan\nc.Chicago\n\n\n";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as ‘ THE LAND OF WHITE ELEPHANTS?\n\n\n\n\n"<<"\na.Bangladesh\nb.Thailand\nc.India\n\n\n";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as ‘ THE CITY OF SEVEN HILLS?\n\n\n\n"<<"\na.Rome\nb.Nilgiri Hills\nc.Tibet\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as ‘ THE DARK CONTIENENT?\n\n\n\n"<<"\na.Asia\nb.Australia\nc.Africa\n\n\n";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
if(x==100)
cout<<"\n\n\n\n\n\n\n\nNo cheating. You have done this earlier also.";
if(x==90)
cout<<"\n\n\n\n\n\n\n\nYou are extremely intelligent. Your Score is 90?";
if(x==80)
cout<<"\n\n\n\n\n\n\n\nYou are intelligent.Your Score is 80?";
if(50==x||x==70||x==60)
cout<<"\n\n\n\n\n\n\n\nYou are average .Your Score is "<<x<<"Better luck next time";
else if(x<=40)
cout<<"\n\n\n\n\n\n\n\nNo use.. Not even 5 questions right";
getch();
}
/* A Game for the Beginners to understand the concept ( higher level game similar to this is posted on this blog as Kaun Banega Crorepati) */
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
void pexit(int x)
{ char a;
cout<<"\n\n\nDo you want to exit(y/n)\t\t";
cin>>a ;
if((a=='y') || (a=='Y'))
{ cout<<"\nyour score is\t"<<x;
getch();
exit(0);
}
}
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<<"\n\n\n\n\n\n\nGuest Enter Your Name\t\t";
cin>>ch1;
clrscr();
cout<<"\n\n\n\nWelcome\t"<<ch1;
cout<<"\n\n\n\nEnter answer in form of 'a','b' and'c'only.";
cout<<"\n\n\nWhat is called as THE HOLYLAND?\n\n\n\n "<<"\na.Jerusalem\nb.Mathura\nc.Mecca\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\nWhat is called as THE ROOF OF THE WORLD?\n\n\n\n"<<"\na.Nepal\nb.Rome\nc.Tibet\n\n\n";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as THE LAND OF RISING SUN?\n\n\n\n"<<"\na.Chicago\nb.Japan\nc.Tibet\n\n\n";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Good Job.Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as THE GIFT OF NILE?\n\n\n\n"<<"\na.Chicago\nb.Egypt\nc.Africa\n\n\n";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as THE LAND OF MIDNIGHT SUN?\n\n\n\n"<<"\na.Norway\nb.Japan\nc.Australia\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as ‘ THE LAND OF THUNDERBOLT?\n\n\n\n"<<"\na.Bhutan\nb.Canada\nc.Arab\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as ‘ THE WINDY CITY?\n\n\n\n"<<"\na.Jerusalem\nb.Japan\nc.Chicago\n\n\n";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as ‘ THE LAND OF WHITE ELEPHANTS?\n\n\n\n\n"<<"\na.Bangladesh\nb.Thailand\nc.India\n\n\n";
cin>>ch2;
if(ch2=='b')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\nWhat is called as ‘ THE CITY OF SEVEN HILLS?\n\n\n\n"<<"\na.Rome\nb.Nilgiri Hills\nc.Tibet\n\n\n";
cin>>ch2;
if(ch2=='a')
{
x=x+10;
cout<<"Your score is "<<x;}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
cout<<"\n\n\n\n\n\n\n\nWhat is called as ‘ THE DARK CONTIENENT?\n\n\n\n"<<"\na.Asia\nb.Australia\nc.Africa\n\n\n";
cin>>ch2;
if(ch2=='c')
{
x=x+10;
cout<<"Your score is "<<x;
}
else
cout<<"Sorry wrong answer.";
pexit(x);
getch();
clrscr();
if(x==100)
cout<<"\n\n\n\n\n\n\n\nNo cheating. You have done this earlier also.";
if(x==90)
cout<<"\n\n\n\n\n\n\n\nYou are extremely intelligent. Your Score is 90?";
if(x==80)
cout<<"\n\n\n\n\n\n\n\nYou are intelligent.Your Score is 80?";
if(50==x||x==70||x==60)
cout<<"\n\n\n\n\n\n\n\nYou are average .Your Score is "<<x<<"Better luck next time";
else if(x<=40)
cout<<"\n\n\n\n\n\n\n\nNo use.. Not even 5 questions right";
getch();
}
No comments:
Post a Comment