From c2043e1cd19e673f4a4a54685ba6f499886671fe Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Tue, 26 Feb 2019 14:45:36 -0600 Subject: S s s --- ee1301/wk3/hw3_directory/strap012_HW3A.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ee1301/wk3/hw3_directory/strap012_HW3A.cpp b/ee1301/wk3/hw3_directory/strap012_HW3A.cpp index f83132d..b10c296 100644 --- a/ee1301/wk3/hw3_directory/strap012_HW3A.cpp +++ b/ee1301/wk3/hw3_directory/strap012_HW3A.cpp @@ -14,14 +14,14 @@ One-armed Bandit Simulator #include using namespace std; -// Function: spin_the_wheel +// Function: spin_the_wheels // --------------------------- // Simulates the one-armed bandit from the previous HW // d: the number of options on the spinner // w: the number of spinners // returns: Either 1 for win or 0 for loss -int spin_the_wheel(int d, int w) { +int spin_the_wheels(int d, int w) { int spinOG=0, spinNew=0, win=0; spinOG = ( (rand() % d) + 1); //Original spin is always the same w-=1; @@ -46,7 +46,7 @@ int main () { for (d=9; d<=27; d++) { winCount=0; for (long n=1000000; n>0; n--) { - int winTest = spin_the_wheel(d, w); + int winTest = spin_the_wheels(d, w); winCount+=winTest; } cout << "w=" << w << ", d=" << d -- cgit v1.2.3