From 68d0b1e936e7816e231410c2fb62f436feaa6e44 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Thu, 28 Feb 2019 13:28:10 -0600 Subject: Changing namespace --- ee1301/wk3/hw3_directory/strap012_HW3A.cpp | 5 ++--- ee1301/wk3/hw3_directory/strap012_HW3B.cpp | 2 +- 2 files changed, 3 insertions(+), 4 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 #include #include -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; diff --git a/ee1301/wk3/hw3_directory/strap012_HW3B.cpp b/ee1301/wk3/hw3_directory/strap012_HW3B.cpp index 4a80ae7..3a46a45 100644 --- a/ee1301/wk3/hw3_directory/strap012_HW3B.cpp +++ b/ee1301/wk3/hw3_directory/strap012_HW3B.cpp @@ -12,11 +12,11 @@ Character Detection #include #include #include -using namespace std; int charTest (char character); int main () { +using namespace std; int test; char character; bool isAlphaNumeric=true; -- cgit v1.2.3