From 22244ac04ff7839cbd6f1e648d1e38bf2fd0170a Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Wed, 20 Feb 2019 14:05:25 +0000 Subject: More comments --- ee1301/wk2/hw2_directory/strap012_HW2B.cpp | 1 + ee1301/wk2/hw2_directory/strap012_HW2C.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'ee1301') 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); -- cgit v1.2.3