aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-02-20 14:05:25 +0000
committerRossTheRoss <msattr@gmail.com>2019-02-20 14:05:25 +0000
commit22244ac04ff7839cbd6f1e648d1e38bf2fd0170a (patch)
treee814239347e24c5fa556bb2a7c37575a3e08d2dd
parentSome optimizing, some commenting, some raging at 2B (still) (diff)
downloadhomework-22244ac04ff7839cbd6f1e648d1e38bf2fd0170a.tar
homework-22244ac04ff7839cbd6f1e648d1e38bf2fd0170a.tar.gz
homework-22244ac04ff7839cbd6f1e648d1e38bf2fd0170a.tar.bz2
homework-22244ac04ff7839cbd6f1e648d1e38bf2fd0170a.tar.lz
homework-22244ac04ff7839cbd6f1e648d1e38bf2fd0170a.tar.xz
homework-22244ac04ff7839cbd6f1e648d1e38bf2fd0170a.tar.zst
homework-22244ac04ff7839cbd6f1e648d1e38bf2fd0170a.zip
More comments
Diffstat (limited to '')
-rw-r--r--ee1301/wk2/hw2_directory/strap012_HW2B.cpp1
-rw-r--r--ee1301/wk2/hw2_directory/strap012_HW2C.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/ee1301/wk2/hw2_directory/strap012_HW2B.cpp b/ee1301/wk2/hw2_directory/strap012_HW2B.cpp
index bd942fb..e863ee5 100644
--- a/ee1301/wk2/hw2_directory/strap012_HW2B.cpp
+++ b/ee1301/wk2/hw2_directory/strap012_HW2B.cpp
@@ -48,6 +48,7 @@ int main()
}
timeChange++;
}
+
if (travel == 'B')
{
}
diff --git a/ee1301/wk2/hw2_directory/strap012_HW2C.cpp b/ee1301/wk2/hw2_directory/strap012_HW2C.cpp
index c1daaf3..55d4486 100644
--- a/ee1301/wk2/hw2_directory/strap012_HW2C.cpp
+++ b/ee1301/wk2/hw2_directory/strap012_HW2C.cpp
@@ -22,7 +22,8 @@ int main () {
cout << "How many values do you want on each wheel? ";
cin >> d;
} while (d==0); //Without this failsafe, the program does undefined things at d=0, usually crashing
- spin1= rand () % d + 1; //Spin is set to be a random number between 1 and d
+
+ spin1= rand () % d + 1;
spin2= rand () % d + 1;
spin3= rand () % d + 1;
spin4= rand () % d + 1;
@@ -39,6 +40,7 @@ int main () {
}
else {
cout << "You lose.";
+
}
cout << endl;
} while (d!=-1);