diff options
author | RossTheRoss <msattr@gmail.com> | 2019-02-28 13:28:10 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-02-28 13:28:10 -0600 |
commit | 68d0b1e936e7816e231410c2fb62f436feaa6e44 (patch) | |
tree | 25aa4b0545afea14d178d668eb79e27ed81b4b8f /ee1301/wk3/hw3_directory/strap012_HW3A.cpp | |
parent | Inconsistency (diff) | |
download | homework-68d0b1e936e7816e231410c2fb62f436feaa6e44.tar homework-68d0b1e936e7816e231410c2fb62f436feaa6e44.tar.gz homework-68d0b1e936e7816e231410c2fb62f436feaa6e44.tar.bz2 homework-68d0b1e936e7816e231410c2fb62f436feaa6e44.tar.lz homework-68d0b1e936e7816e231410c2fb62f436feaa6e44.tar.xz homework-68d0b1e936e7816e231410c2fb62f436feaa6e44.tar.zst homework-68d0b1e936e7816e231410c2fb62f436feaa6e44.zip |
Changing namespace
Diffstat (limited to 'ee1301/wk3/hw3_directory/strap012_HW3A.cpp')
-rw-r--r-- | ee1301/wk3/hw3_directory/strap012_HW3A.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ee1301/wk3/hw3_directory/strap012_HW3A.cpp b/ee1301/wk3/hw3_directory/strap012_HW3A.cpp index 933d072..52b3ce4 100644 --- a/ee1301/wk3/hw3_directory/strap012_HW3A.cpp +++ b/ee1301/wk3/hw3_directory/strap012_HW3A.cpp @@ -12,7 +12,6 @@ One-armed Bandit Simulator #include <stdlib.h> #include <cmath> #include <iomanip> -using namespace std; int spin_the_wheels(int d, int w); @@ -28,9 +27,9 @@ int main () { winCount+=winTest; } if (w==6) { - cout << scientific; + std::cout << scientific; } - cout << "w=" << w << ", d=" << d + std::cout << "w=" << w << ", d=" << d << ": Simulated probability = m/n = " << (winCount / 1000000.0) * 100.0 << "%. " << "Theoretical probability = " << (d / (pow(d, w))) * 100 << "%." << endl; d+=2; |