diff options
author | RossTheRoss <msattr@gmail.com> | 2019-02-23 17:48:39 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-02-23 17:48:39 -0600 |
commit | 613cfe16b575cff2800d9b13fc73c51215f11c71 (patch) | |
tree | c2a4afdba5ef1d4b5ac5273f1fffc3726dfd0fe3 /ee1301/wk3 | |
parent | ah. (diff) | |
download | homework-613cfe16b575cff2800d9b13fc73c51215f11c71.tar homework-613cfe16b575cff2800d9b13fc73c51215f11c71.tar.gz homework-613cfe16b575cff2800d9b13fc73c51215f11c71.tar.bz2 homework-613cfe16b575cff2800d9b13fc73c51215f11c71.tar.lz homework-613cfe16b575cff2800d9b13fc73c51215f11c71.tar.xz homework-613cfe16b575cff2800d9b13fc73c51215f11c71.tar.zst homework-613cfe16b575cff2800d9b13fc73c51215f11c71.zip |
Dividing by 0 is a no
Diffstat (limited to '')
-rw-r--r-- | ee1301/wk3/hw3_directory/strap012_HW3A.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ee1301/wk3/hw3_directory/strap012_HW3A.cpp b/ee1301/wk3/hw3_directory/strap012_HW3A.cpp index 491628e..fd051fd 100644 --- a/ee1301/wk3/hw3_directory/strap012_HW3A.cpp +++ b/ee1301/wk3/hw3_directory/strap012_HW3A.cpp @@ -27,11 +27,11 @@ int spin_the_wheel(int d, int w) { return 1; } int main () { - long n=1000000; + long n=0; int m=0; - int d= 3; - int w= 9; - for (n; n>0; n--) { + float d= 3; + float w= 9; + for (n; n<=1000000; n++) { m = spin_the_wheel(d,w); if (m==1) { m++; |