From 7bd0457ece5cfea5e17d6f2ac04508daefc6e4e3 Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Wed, 17 Apr 2019 17:00:57 -0500 Subject: LAB TIME OH NO --- ee1301/wk6/hw6_directory/strap012_HW6A.cpp | 12 ++++++------ ee1301/wk6/hw6_directory/strap012_HW6B.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'ee1301/wk6/hw6_directory') diff --git a/ee1301/wk6/hw6_directory/strap012_HW6A.cpp b/ee1301/wk6/hw6_directory/strap012_HW6A.cpp index de36cf6..d802c15 100644 --- a/ee1301/wk6/hw6_directory/strap012_HW6A.cpp +++ b/ee1301/wk6/hw6_directory/strap012_HW6A.cpp @@ -15,7 +15,7 @@ private: int min; int max; public: - int roll(int min, int max) { + int roll() { return rand() % (max-min+1) + min; }; Dice() { //Default constructor for debugging purposes @@ -30,7 +30,7 @@ public: int main() { int rounds; - Dice die[maxNumDie]; + Dice die; int roll[maxNumDie]; int max=0, min=999999, sum=0, sample=0; double avg; @@ -54,10 +54,10 @@ int main() { double numRolls=0; for (int j=0; j