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
|
#include "stdafx.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
string right1;
string otvet; // user’s answer 1
string right2;
string otvet2; // user’s answer 2
string right3;
string right4;
string otvet3; // user’s answer 3
string otvet4; // user’s answer 4
int points = 0; // starting points
int a = 0; // I tried to save first received point
int b = 0; // I tried to save second received point
int c = 0; // I tried to save third received point
right1 = "M.A.Lavrentiev";
right2 = "The Round Table";
right3 = "The letter of 46";
right4 = "Neil Armstrong";
cout << "Here are the questions, try to answer all of them! " << endl;
cout << endl;
cout << "1. Who had honored kids as musketeers at ''Viktoria'' club during 60th? " << endl;
cout << endl;
getline(cin, otvet);
if (otvet.compare(right1) == 0) {
cout << otvet << " Is correct, nicely done! " << '\n';
points++;
a = points;
}
else {
cout << otvet << " Is not correct, try again " << '\n';
points = 0;
}
cout << endl;
cout << "2. What had united the imaginary knights of one of the misty Albion rulers and the real colleagues of the great nuclear physic scholar from Novosibirsk? " << endl;
cout << endl;
getline(cin, otvet2);
if (otvet2.compare(right2) == 0) {
cout << otvet2 << " Is correct, nicely done! " << '\n';
points++;
b = points;
}
else {
cout << otvet2 << " Is not correct, try again " << '\n';
points = a;
}
cout << endl;
cout << "3. What unites USSR dissident movement, ''White Book'', ''Phoenix-66'', ''The case of the four'', ''Voice of America'' and Akademgorodok scientist of 60th? " << endl;
cout << endl;
getline(cin, otvet3);
if (otvet3.compare(right3) == 0) {
cout << otvet3 << " Is correct, nicely done! " << '\n';
points++;
c = points;
}
else {
cout << otvet3 << " Is not correct, try again " << '\n';
points = b;
}
cout << endl;
cout << "4. One of them had been named ''The Jazz ambassador'', other is worldwide known for his step and leap and also had visited Akademgorodok as the honorable guest at 60th - who is that other? " << endl;
cout << endl;
getline(cin, otvet4);
if (otvet4.compare(right4) == 0) {
cout << otvet4 << " Is correct, nicely done! " << '\n';
points++;
}
else {
cout << otvet4 << " Is not correct, try again " << '\n';
points = c;
}
cout << endl;
cout << "Your score = " << points << endl;
return 0;
}
|