aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk6
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-04-17 12:40:03 -0500
committerRossTheRoss <msattr@gmail.com>2019-04-17 12:40:03 -0500
commitf5c7e867577539d672e7b3ec0472e5dde0cd151e (patch)
treea082cb87b7dfc4e47de543c90b951eb000ac536d /ee1301/wk6
parentRename thing (diff)
downloadhomework-f5c7e867577539d672e7b3ec0472e5dde0cd151e.tar
homework-f5c7e867577539d672e7b3ec0472e5dde0cd151e.tar.gz
homework-f5c7e867577539d672e7b3ec0472e5dde0cd151e.tar.bz2
homework-f5c7e867577539d672e7b3ec0472e5dde0cd151e.tar.lz
homework-f5c7e867577539d672e7b3ec0472e5dde0cd151e.tar.xz
homework-f5c7e867577539d672e7b3ec0472e5dde0cd151e.tar.zst
homework-f5c7e867577539d672e7b3ec0472e5dde0cd151e.zip
Last minute touch-ups
Diffstat (limited to '')
-rw-r--r--ee1301/wk6/hw6_directory/strap012_HW6A.cpp4
-rw-r--r--ee1301/wk6/hw6_directory/strap012_HW6B.cpp1
2 files changed, 1 insertions, 4 deletions
diff --git a/ee1301/wk6/hw6_directory/strap012_HW6A.cpp b/ee1301/wk6/hw6_directory/strap012_HW6A.cpp
index f2f983f..c255ade 100644
--- a/ee1301/wk6/hw6_directory/strap012_HW6A.cpp
+++ b/ee1301/wk6/hw6_directory/strap012_HW6A.cpp
@@ -4,7 +4,6 @@
//HW 6A: Dice Class
#include <iostream>
#include <cstdlib>
-#include <time.h>
using namespace std;
const int maxNumDie=50;
@@ -35,7 +34,7 @@ int main() {
int roll[maxNumDie];
int max=0, min=999999, sum=0, sample=0;
double avg;
- srand(time(0)); // DO NOT WRITE THIS LINE AGAIN OR ANYWHERE ELSE
+ srand(time(NULL)); // DO NOT WRITE THIS LINE AGAIN OR ANYWHERE ELSE
cout << "What do you want to roll? ";
string s;
getline(cin, s);
@@ -57,7 +56,6 @@ int main() {
int curRoll=0;
numRolls+=1.0;
for(int i=1; i < pairs[0]; i+=2) {
-// cout << "["<<pairs[i]<<","<<pairs[i+1] <<"]" << endl;
die[i-1] = Dice(pairs[i], pairs[i + 1]);
roll[i-1] = die[i-1].roll(pairs[i], pairs[i+1]);
curRoll += roll[i-1];
diff --git a/ee1301/wk6/hw6_directory/strap012_HW6B.cpp b/ee1301/wk6/hw6_directory/strap012_HW6B.cpp
index d53ea08..99b20cd 100644
--- a/ee1301/wk6/hw6_directory/strap012_HW6B.cpp
+++ b/ee1301/wk6/hw6_directory/strap012_HW6B.cpp
@@ -29,7 +29,6 @@ int ff(int x) {
}
} else {
// x is 1
- //std::cout << "Returning from ff(1) = 1\n";
return 1;
}
}