1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
|
#include<iostream>
#include<conio.h>
#include<string>
using namespace std;
int main()
{
string A,animal,correct,heading,A1,answer1,name;
int age,subject;
string subj[10] = {"[1] Grade 1 Civics and culture" , "[2] Grade 1 Filipino", "[3] Grade 2 English","[4] Grade 2 Math", "[5] Grade 3 Civics and Culture", "[6] Grade 3 Math", "[7] Grade 4 History", "[8] Grade 4 MAPEH" , "[9] Grade 5 Science", "[10] Grade 5 English"};
char play,another,N,n,Y,y,ans,g,G,I,i,X,x,C1,help;
bool peekUsed=false;
bool copyUsed=false;
bool saveUsed=false;
cout << "Welcome to our Game show"<< endl;
cout << "====================================================" << endl;
cout << "Are you smarter than a 5th grader?" << endl;
cout << "====================================================\n\n" << endl;
cout<<"Enter name (first name only): ";
cin>>name;
cout<<"Enter age: ";
cin>>age;
system("cls");
cout << "====================================================" << endl;
cout << "Are you smarter than a 5th grader?" << endl;
cout << "====================================================\n\n\n" << endl;
cout << " (I recommend you to read instructions first to avoid confusion in the game) \n\n";
cout<<"Press [I] for instructions, [G] for start, [X] for exit: ";
cin>>ans;
if(ans=='G'||ans=='g'){
while(A1==correct){
system("cls");
cout << "====================================================" << endl;
cout << "Are you smarter than a 5th grader?" << endl;
cout << "====================================================\n\n\n" << endl;
//cout<<" [1] Grade 1 Civics and Culture [2] Grade 1 Filipino\n\n [3] Grade 2 English\t\t [4] Grade 2 Math\n\n [5] Grade 3 Civics and Culture [6] Grade 3 Math\n\n [7] Grade 4 History\t\t [8] Grade 4 MAPEH\n\n [9] Grade 5 Science\t\t [10] Grade 5 English\n\n";
for(int ctr = 0; ctr<10; ctr++)
{
cout<<subj[ctr]<<endl;
}
cout<<"\nPlease select your subject: ";
cin>>subject;
system("cls");
switch(subject){
case 1: cout << "====================================================" << endl;
cout << "Are you smarter than a 5th grader?" << endl;
cout << "====================================================\n\n\n" << endl;
cout<<"Complete the quote below:\n\n"; //answer dito ay: animal
cout<<" He who does not love his own language is worse than an _____ and smelly fish\n\n";
cout<<"Do you need help?[y/n]: ";
cin>>help;
subj[0] = "";
if(help=='Y'||help=='y'){
if (peekUsed == false)
cout << "[P] for peek\n";
if (copyUsed == false)
cout << "[C] for Copy\n";
if(saveUsed == false)
cout<<"[S] for Save\n";
cout<<"Enter your choice: ";
cin>>C1;
{
if(C1=='P'||C1=='p'){
cout<<"\nThe answer is animal";
peekUsed=true;
cout<<"\n\nEnter your answer: ";
cin>>A1;
correct="animal";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
if(C1=='C'||C1=='c'){
cout<<"Correct! The answer is animal ";
copyUsed=true;
}
if(C1=='S'||C1=='s'){
cout<<"Enter your answer: ";
cin>>A;
cout<<"Correct! The answer is animal";
saveUsed=true;
}
}
}
if(help=='N'||help=='n'){
cout<<"Enter your answer: ";
cin>>A1;
correct="animal";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
break;
case 2: cout << "====================================================" << endl;
cout << "Are you smarter than a 5th grader?" << endl;
cout << "====================================================\n\n\n" << endl;
cout<<"A part of a friendly letter where it states the adress of the writer and the date it was made\n\n"; //answer dito ay heading
cout<<"Do you need help?[y/n]: ";
cin>>help;
subj[1] = "";
if(help=='Y'||help=='y'){
if (peekUsed == false)
cout << "[P] for peek\n";
if (copyUsed == false)
cout << "[C] for Copy\n";
if(saveUsed == false)
cout<<"[S] for Save\n";
cout<<"Enter your choice: ";
cin>>C1;
{
if(C1=='P'||C1=='p'){
cout<<"The answer is heading";
peekUsed=true;
cout<<"\nEnter your answer: ";
cin>>A1;
correct="heading";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
if(C1=='C'||C1=='c'){
cout<<"Correct! The answer is heading ";
copyUsed=true;
}
if(C1=='S'||C1=='s'){
cout<<"Enter your answer: ";
cin>>A;
cout<<"Correct! The answer is heading";
saveUsed=true;
}
}
}
if(help=='N'||help=='n'){
cout<<"Enter your answer: ";
cin>>A1;
correct="heading";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
break;
case 3: cout << "====================================================" << endl;
cout << "Are you smarter than a 5th grader?" << endl;
cout << "====================================================\n\n\n" << endl;
cout<<"True or False:\n\n"; //answer dito ay true
cout<<"When the plural of a noun shows possession or ownership, it is in its plural possessive form\n\n";
cout<<"Do you need help?[y/n]: ";
cin>>help;
subj[2] = "";
if(help=='Y'||help=='y'){
if (peekUsed == false)
cout << "[P] for peek\n";
if (copyUsed == false)
cout << "[C] for Copy\n";
if(saveUsed == false)
cout<<"[S] for Save\n";
cout<<"Enter your choice: ";
cin>>C1;
{
if(C1=='P'||C1=='p'){
cout<<"The answer is true";
peekUsed=true;
cout<<"\nEnter your answer: ";
cin>>A1;
correct="true";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
if(C1=='C'||C1=='c'){
cout<<"Correct! The answer is true ";
copyUsed=true;
}
if(C1=='S'||C1=='s'){
cout<<"Enter your answer: ";
cin>>A;
cout<<"Correct! The answer is true";
saveUsed=true;
}
}
}
if(help=='N'||help=='n'){
cout<<"Enter your answer: ";
cin>>A1;
correct="true";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
break;
case 4: cout << "====================================================" << endl;
cout << "Are you smarter than a 5th grader?" << endl;
cout << "====================================================\n\n\n" << endl;
cout<<"Identify:\n\n";
cout<<"A quantity or number to be subtracted from another\n\n"; //answer dito ay subtrahend
cout<<"Do you need help?[y/n]: ";
cin>>help;
subj[3]="";
if(help=='Y'||help=='y'){
if (peekUsed == false)
cout << "[P] for peek\n";
if (copyUsed == false)
cout << "[C] for Copy\n";
if(saveUsed == false)
cout<<"[S] for Save\n";
cout<<"Enter your choice: ";
cin>>C1;
{
if(C1=='P'||C1=='p'){
cout<<"The answer is subtrahend\n";
peekUsed=true;
cout<<"\nEnter your answer: ";
cin>>A1;
correct="subtrahend";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
if(C1=='C'||C1=='c'){
cout<<"Correct! The answer is subtrahend";
copyUsed=true;
}
if(C1=='S'||C1=='s'){
cout<<"Enter your answer: ";
cin>>A;
cout<<"Correct! The answer is subtrahend";
saveUsed=true;
}
}
}
if(help=='N'||help=='n'){
cout<<"Enter your answer: ";
cin>>A1;
correct="subtrahend";
{
if(A1==correct)
cout<<"Correct!";
if(A1!=correct)
cout<<"Wrong answer";
}
}
break;
| |