Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

#include <iostream>

using namespace std;

int main()
{
int a, b, c;
char ansa, ansb, ansc;

cout<<"Welcome to Quiz Bee101!\n";


cout<<"I have a total of three questions.\n";
cout<<"Each questions have different prizes.\n";
cout<<"If you got three correct answer, you'll get a total of P1,000,000!\n";
cout<<""<<endl;
cout<<"Are you ready? Press 1 if yes, otherwise press 2 if no: ";
cin>>a;
if (a==1){
cout<<"GREAT"<<endl;
cout<<""<<endl;
cout<<"For P10,000:"<<endl;
cout<<"Question #1: In the children book series, where is Paddington Bear
Originally from?\nA: India\nB: Peru\nC: Canda\nD: Iceland"<<endl;
tryagain1:
cout<<"Your answer: ";
cin>>ansa;
switch(ansa){
case 'A':
cout<<"WRONG!"<<endl;
goto end;
break;
case 'C':
cout<<"WRONG!"<<endl;
goto end;
break;
case 'D':
cout<<"WRONG!"<<endl;
goto end;
break;
case 'B':{
cout<<"CORRECT!"<<endl;
c=10000;
cout<<""<<endl;
cout<<"For P20,000:\n Question #2: Which insect shorted out an early
supercomputer and inspired the term computer bug?"<<endl;
cout<<"A: Moth\nB: Roach\nC: Fly\nD: Japanese Bettle"<<endl;
tryagain2:
cout<<"Your answer: ";
cin>>ansb;
switch (ansb){
case 'B':
cout<<"WRONG!"<<endl;
goto end;
break;
case 'C':
cout<<"WRONG!"<<endl;
goto end;
break;
case 'D':
cout<<"WRONG!"<<endl;
goto end;
break;
case 'A':{
c+=20000;
cout<<"CORRECT!"<<endl;
cout<<""<<endl;
cout<<"For the JACKPOT QUESTION, if you answered this correctly, you'll
bag home the jackpot prize: P1,000,000."<<endl;
cout<<"However, if you answered it wrong, you'll go home with only
P2,000."<<endl;
cout<<"Do you wish to continue? Press 1 if yes, Press 2 if no: ";
cin>>b;
if (b==1){
cout<<""<<endl;
cout<<"GREAT"<<endl;
cout<<""<<endl;
cout<<"For P1,000,000:\n Question #3: Which of the following men does
not have a chemical element named for him"<<endl;
cout<<"A: Albert Einstein\nB: Niels Bohr\nC: Isaac Newton\nD: Enrico
Fermi"<<endl;
tryagain3:
cout<<"Your answer: ";
cin>>ansb;
switch (ansb){
case 'A':
cout<<"WRONG!"<<endl;
cout<<""<<endl;
cout<<"I�M SORRY. BUT STILL, YOU GOT P2,000!"<<endl;
goto end;
break;
case 'B':
cout<<"WRONG!"<<endl;
cout<<""<<endl;
cout<<"I�M SORRY. BUT STILL, YOU GOT P2,000!"<<endl;
goto end;
break;
case 'D':
cout<<"WRONG!"<<endl;
cout<<""<<endl;
cout<<"I�M SORRY. BUT STILL, YOU GOT P2,000!"<<endl;
goto end;
break;
case 'C':
cout<<"CORRECT"<<endl;
cout<<""<<endl;
cout<<"CONGRATULATIONS! YOU WON 1,000,000 PESOS!\nTHANK YOU FOR
JOINING!"<<endl;
goto end;
break;
default:
cout<<"Invalid answer!"<<endl;
goto tryagain3;
}
}
else{
if (b==2)
cout<<""<<endl;
cout<<"That's okay. You still won a staggering "<<c<<" pesos!"<<endl;
goto end;
}
default:
cout<<"Invalid answer!"<<endl;
goto tryagain2;
}
}
default:
cout<<"Invalid answer!"<<endl;
goto tryagain1;

}
}
}else{
if (a==2)
cout<<"How sad. Bye!";
}
end:
return 0;
}

You might also like