diff options
author | Matthew Strapp <msattr@gmail.com> | 2019-02-19 16:06:34 -0600 |
---|---|---|
committer | Matthew Strapp <msattr@gmail.com> | 2019-02-19 16:06:34 -0600 |
commit | 8d94f5ae5f69335fe00b4b8d9a722a9b664280de (patch) | |
tree | defc08bff45e61971e2a7927a5388d3f549e582f | |
parent | Recursion is bad (diff) | |
download | homework-8d94f5ae5f69335fe00b4b8d9a722a9b664280de.tar homework-8d94f5ae5f69335fe00b4b8d9a722a9b664280de.tar.gz homework-8d94f5ae5f69335fe00b4b8d9a722a9b664280de.tar.bz2 homework-8d94f5ae5f69335fe00b4b8d9a722a9b664280de.tar.lz homework-8d94f5ae5f69335fe00b4b8d9a722a9b664280de.tar.xz homework-8d94f5ae5f69335fe00b4b8d9a722a9b664280de.tar.zst homework-8d94f5ae5f69335fe00b4b8d9a722a9b664280de.zip |
WHAT WORKS: Forward
WHAT DOESN'T: Backward
Diffstat (limited to '')
-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 + + +} |