aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk3/hw3_directory/strap012_HW3A.cpp
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-02-28 13:28:10 -0600
committerRossTheRoss <msattr@gmail.com>2019-02-28 13:28:10 -0600
commit68d0b1e936e7816e231410c2fb62f436feaa6e44 (patch)
tree25aa4b0545afea14d178d668eb79e27ed81b4b8f /ee1301/wk3/hw3_directory/strap012_HW3A.cpp
parentInconsistency (diff)
downloadhomework-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.cpp5
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;