aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ee1301/wk2/hw2_directory/strap012_2B.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/ee1301/wk2/hw2_directory/strap012_2B.cpp b/ee1301/wk2/hw2_directory/strap012_2B.cpp
index be727a3..4675b35 100644
--- a/ee1301/wk2/hw2_directory/strap012_2B.cpp
+++ b/ee1301/wk2/hw2_directory/strap012_2B.cpp
@@ -23,6 +23,9 @@ int main()
cin >> hourChange >> travel;
for (int i = hourChange; i >= 0; i--)
{
+ if (i != 0) {
+ intervalChange++;
+ }
if (travel=='F') {
if (hourOG+hourChange>=12 && bar) {
if (hourOG+hourChange==12) {