aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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