aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301
diff options
context:
space:
mode:
authorRossTheRoss <msattr@gmail.com>2019-02-19 21:31:07 +0000
committerRossTheRoss <msattr@gmail.com>2019-02-19 21:31:07 +0000
commit654f7221575d24048c397d9b8b9e7b45705e7075 (patch)
treecce85213ae61be80d3415d337c80a388be16a908 /ee1301
parent(More screaming) (diff)
downloadhomework-654f7221575d24048c397d9b8b9e7b45705e7075.tar
homework-654f7221575d24048c397d9b8b9e7b45705e7075.tar.gz
homework-654f7221575d24048c397d9b8b9e7b45705e7075.tar.bz2
homework-654f7221575d24048c397d9b8b9e7b45705e7075.tar.lz
homework-654f7221575d24048c397d9b8b9e7b45705e7075.tar.xz
homework-654f7221575d24048c397d9b8b9e7b45705e7075.tar.zst
homework-654f7221575d24048c397d9b8b9e7b45705e7075.zip
Recursion is bad
Diffstat (limited to 'ee1301')
-rw-r--r--ee1301/wk2/hw2_directory/strap012_2B.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/ee1301/wk2/hw2_directory/strap012_2B.cpp b/ee1301/wk2/hw2_directory/strap012_2B.cpp
index 2a600b4..3ed926c 100644
--- a/ee1301/wk2/hw2_directory/strap012_2B.cpp
+++ b/ee1301/wk2/hw2_directory/strap012_2B.cpp
@@ -24,17 +24,19 @@ int main () {
if (i!=0){
intervalChange++;
} do {
+ // STILL BROKEN
if (travel=='B' && hourOG-intervalChange<0){
if (hourChange<12) {
- intervalChange-=12;
+ intervalChange=12-hourChange;
} else {
- intervalChange=12-intervalChange;
+ intervalChange=hourChange-12;
if (intervalChange>=13) {
intervalChange-=12;
}
}
timeChange++;
}
+ // STILL BROKEN
} while (intervalChange>12);
if (intervalChange>=12) {
//if (intervalChange !=12) {i