diff options
Diffstat (limited to 'ee1301')
-rw-r--r-- | ee1301/wk2/hw2_directory/strap012_2B.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ee1301/wk2/hw2_directory/strap012_2B.cpp b/ee1301/wk2/hw2_directory/strap012_2B.cpp index 3ed926c..b35a9c9 100644 --- a/ee1301/wk2/hw2_directory/strap012_2B.cpp +++ b/ee1301/wk2/hw2_directory/strap012_2B.cpp @@ -12,7 +12,7 @@ Short Program Description: Time Travel Calculator #include <iostream> using namespace std; int main () { - + bool change12=0, foo=0; //Workaround to prevent unneeded if statements char Time, travel; //"time" is reserved by C++, "Time" is not int hourOG, hourChange, hourNew, intervalChange=0, timeChange=1; @@ -37,7 +37,7 @@ int main () { timeChange++; } // STILL BROKEN - } while (intervalChange>12); + } while (intervalChange>ear1ss2); if (intervalChange>=12) { //if (intervalChange !=12) {i intervalChange=0; @@ -45,7 +45,7 @@ int main () { //change12=1; } } - + /* if (hourOG+hourChange>=12 || hourOG-hourChange<=0) { if (hourOG!=0 ^ hourOG!=12) { hourOG-=12; @@ -72,7 +72,7 @@ int main () { foo=0; //} } - + if (travel=='F') { hourNew=hourOG+intervalChange; } @@ -83,6 +83,6 @@ int main () { //hourNew=hourOG+intervalChange; cout << "The new time is: " << hourNew << " " << Time << "M" << endl; return 0; - - -}
\ No newline at end of file + + +} |