From 8d94f5ae5f69335fe00b4b8d9a722a9b664280de Mon Sep 17 00:00:00 2001 From: Matthew Strapp Date: Tue, 19 Feb 2019 16:06:34 -0600 Subject: WHAT WORKS: Forward WHAT DOESN'T: Backward --- ee1301/wk2/hw2_directory/strap012_2B.cpp | 14 +++++++------- 1 file 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 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 + + +} -- cgit v1.2.3