aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk6/hw6_directory
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ee1301/wk6/hw6_directory/strap012_HW6A.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/ee1301/wk6/hw6_directory/strap012_HW6A.cpp b/ee1301/wk6/hw6_directory/strap012_HW6A.cpp
index c255ade..de36cf6 100644
--- a/ee1301/wk6/hw6_directory/strap012_HW6A.cpp
+++ b/ee1301/wk6/hw6_directory/strap012_HW6A.cpp
@@ -60,7 +60,7 @@ int main() {
roll[i-1] = die[i-1].roll(pairs[i], pairs[i+1]);
curRoll += roll[i-1];
}
-
+
if (curRoll > max) {
max = curRoll;
}
@@ -68,6 +68,7 @@ int main() {
min = curRoll;
}
sum+=curRoll;
+ sample=curRoll;
}
avg = sum / numRolls;
cout << "Sample roll: " << sample << endl