-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLetsQuiz.cpp
82 lines (71 loc) · 1.85 KB
/
LetsQuiz.cpp
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
#include <iostream>
using namespace std;
int main()
{
char YN;
char answer1, answer2, answer3;
cout << "Let's Quiz!" << endl
<< endl;
cout << " NOTE 1#: You have only Three(3)live to answer,Choose the right answer." << endl;
cout << " NOTE 2#: Type a,b, or c for your answer." << endl
<< endl;
cout << "-----------------------–---------------------------------" << endl;
cout << " Want to Start?: (y/n) ";
cin >> YN;
cout << endl;
if (YN == 'Y' || YN == 'y')
{
// Question 1#
cout << "1. COMPUTER IS? " << endl;
cout << " a. Smart" << endl;
cout << " b. Fast" << endl;
cout << " c. Slow " << endl;
cout << "Answer: ";
cin >> answer1;
if (answer1 == 'b' || answer1 == 'B')
{
cout << " - Yup, Computers are Fast, Not Smart remember that." << endl
<< endl;
}
else
cout << " - Wrong, review that again" << endl
<< endl;
cout << " Good job!";
cout << "------------------------------" << endl
<< endl;
// Question 2#:
cout << "2. WHO CREATE C LANGUANGE? " << endl;
cout << " a. Dennis Ritchie" << endl;
cout << " b. Ada lovelace" << endl;
cout << " c. Aristotle" << endl;
cout << "Answer: ";
cin >> answer2;
if (answer2 == 'a' || answer2 == 'A')
{
cout << " - Good, it is Dennis M. Ritchie " << endl;
}
else
cout << " Good job!";
cout << "-------------------------------" << endl
<< endl;
// Question 3#:
cout << "3. C++ publish? " << endl;
cout << " a. AEFAEF" << endl;
cout << " b. AEFAFEAFaAEFe" << endl;
cout << " c. AAFAEAEFEA" << endl;
cout << "Answer: ";
cin >> answer3;
if (answer2 == 'a' || answer2 == 'A')
{
cout << " - Good, it is Dennis M. Ritchie " << endl;
}
else
cout << " - Nice Try" << endl;
cout << " Good job!";
cout << "-----------------------------" << endl
<< endl;
}
else
cout << "hmmm,Okay. Thanks!";
cout << " Thanks! ";
}