aboutsummaryrefslogtreecommitdiffstats
path: root/ee1301/wk2
diff options
context:
space:
mode:
Diffstat (limited to 'ee1301/wk2')
-rw-r--r--ee1301/wk2/hw2_directory/strap012_2B.cpp52
1 files changed, 1 insertions, 51 deletions
diff --git a/ee1301/wk2/hw2_directory/strap012_2B.cpp b/ee1301/wk2/hw2_directory/strap012_2B.cpp
index ff060a8..15c8152 100644
--- a/ee1301/wk2/hw2_directory/strap012_2B.cpp
+++ b/ee1301/wk2/hw2_directory/strap012_2B.cpp
@@ -21,54 +21,4 @@ int main()
cin >> hourOG >> Time;
cout << "How many hours forward or backward do you want to move the clock (F for forwards, B for backward): ";
cin >> hourChange >> travel;
- for (int i = hourChange; i >= 0; i--)
- {
- if (i != 0) {
- intervalChange++;
- }
- if (travel=='F') {
- if (hourOG+hourChange>=12) {
- if (hourOG+hourChange==12) {
- timeChange++;
- } else {
- hourNew=(hourOG+hourChange)-12;
- bar=true;
- }
- timeChange++;
- }
- }
- if (travel=='B') {
-
- }
- if (intervalChange >= 12) {
- intervalChange = 0;
- timeChange++;
- }
- }
-
- for (timeChange; timeChange > 1; timeChange--) {
- //if (change12) {
- if (Time == 'A')
- {
- Time += 15;
- //foo = true;
- } else {
- if (Time == 'P') { //&& !foo) {
- Time -= 15;
- }
- //foo = false;
- }
- }
- if (travel == 'F' && !bar)
- {
- hourNew = hourOG + intervalChange;
- }
- if (travel == 'B')
- {
- hourNew = hourOG + intervalChange;
- }
- //Deprecated, doesn't work
- //hourNew=hourOG+intervalChange;
- cout << "The new time is: " << hourNew << " " << Time << "M" << endl;
- return 0;
-} \ No newline at end of file
+ \ No newline at end of file