aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk1/lab1
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-02-07 21:47:03 -0600
committerRossTheRoss <msattr@gmail.com>2019-02-07 21:47:03 -0600
commit92613964f74098dd07406719dd8eb4af4c1cd21e (patch)
tree945903f8a72463416b05b47adacb3504b4b58bc2 /ee1301/wk1/lab1
parentBored in Lecture? Find prime numbers! (diff)
downloadhomework-92613964f74098dd07406719dd8eb4af4c1cd21e.tar
homework-92613964f74098dd07406719dd8eb4af4c1cd21e.tar.gz
homework-92613964f74098dd07406719dd8eb4af4c1cd21e.tar.bz2
homework-92613964f74098dd07406719dd8eb4af4c1cd21e.tar.lz
homework-92613964f74098dd07406719dd8eb4af4c1cd21e.tar.xz
homework-92613964f74098dd07406719dd8eb4af4c1cd21e.tar.zst
homework-92613964f74098dd07406719dd8eb4af4c1cd21e.zip
phone posting
Diffstat (limited to 'ee1301/wk1/lab1')
-rw-r--r--ee1301/wk1/lab1/strap012_lab1_s_3.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/ee1301/wk1/lab1/strap012_lab1_s_3.cpp b/ee1301/wk1/lab1/strap012_lab1_s_3.cpp
index e69de29..346f8c9 100644
--- a/ee1301/wk1/lab1/strap012_lab1_s_3.cpp
+++ b/ee1301/wk1/lab1/strap012_lab1_s_3.cpp
@@ -0,0 +1,29 @@
+#include <iostream>
+#include <string>
+#include <stdlib.h>
+using namespace std;
+
+int main () {
+ string name, quest, color, assyria, swallowSpeed;
+ cout << "Before you cross this bridge, answer the questions three." << endl << endl << "Question the first: what is your name? ";
+ cin >> name;
+ cout << "What is your quest? ";
+ cin >> quest;
+ int a = rand() % 3 + 1;
+ if (a == 1) {
+ cout << "What is your favorite color? ";
+ cin >> color; }
+ if (a == 2) {
+ cout << "What is the captial of Assyria? ";
+ cin >> assyria; }
+ if (a == 3) {
+ cout << "What is the air speed of an unladen swallow?";
+ getline(cin,swallowSpeed); }
+
+ if (color == "null" || assyria == "Nineveh" || swallowSpeed == "African or European?") {
+ cout << endl << "Go on." << endl; }
+ else {
+ cout << "BEGONE" << endl;
+ return 100; }
+
+}