From 41ae05a835ace3f736117c768511589d28a6503e Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Wed, 17 Apr 2019 13:48:53 -0500 Subject: finish up --- ee1301/wk6/hw6_directory/strap012_HW6A.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ee1301') 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 -- cgit v1.2.3