aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);