| 155 | } |
| 156 | |
| 157 | void Question::askQuestion() { |
| 158 | cout << endl; |
| 159 | cout << Question_Text << endl; |
| 160 | cout << "1. " << Answer_1 << endl; |
| 161 | cout << "2. " << Answer_2 << endl; |
| 162 | cout << "3. " << Answer_3 << endl; |
| 163 | cout << "4. " << Answer_4 << endl; |
| 164 | cout << endl; |
| 165 | |
| 166 | |
| 167 | cout << "Answer: "; |
| 168 | cin >> Guess; |
| 169 | |
| 170 | if (Guess == Correct_Answer) |
| 171 | { |
| 172 | cout << endl; |
| 173 | cout << "Great! You are Correct." << endl; |
| 174 | Total += Question_Score; |
| 175 | cout << "Score: " << Question_Score << " Out of " << Question_Score << " !" << endl; |
| 176 | |
| 177 | } |
| 178 | else |
| 179 | { |
| 180 | cout << endl; |
| 181 | cout << "Oh, NO. You are Wrong." << endl; |
| 182 | cout<<"Score: 0"<<" Out of "<<Question_Score<< " !" << endl; |
| 183 | cout << "The correct answer is " << Correct_Answer << endl; |
| 184 | cout<<endl; |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | |
| 189 | |