aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2
diff options
context:
space:
mode:
authorMatthew Strapp <msattr@gmail.com>2019-02-19 16:06:34 -0600
committerMatthew Strapp <msattr@gmail.com>2019-02-19 16:06:34 -0600
commit8d94f5ae5f69335fe00b4b8d9a722a9b664280de (patch)
treedefc08bff45e61971e2a7927a5388d3f549e582f /ee1301/wk2
parentRecursion is bad (diff)
downloadhomework-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 'ee1301/wk2')
-rw-r--r--ee1301/wk2/hw2_directory/strap012_2B.cpp14
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
+
+
+}