From a358e9ca0aa953bbc39197c927e4a19cac87374d Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Sun, 17 Feb 2019 20:04:25 +0000 Subject: Fix minor spacing inconsistencies --- ee1301/wk2/hw2_directory/strap012_2A.cpp | 7 +++++-- ee1301/wk2/hw2_directory/strap012_2B.cpp | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'ee1301/wk2/hw2_directory') diff --git a/ee1301/wk2/hw2_directory/strap012_2A.cpp b/ee1301/wk2/hw2_directory/strap012_2A.cpp index 9b9171f..35e9fed 100644 --- a/ee1301/wk2/hw2_directory/strap012_2A.cpp +++ b/ee1301/wk2/hw2_directory/strap012_2A.cpp @@ -14,10 +14,12 @@ int main () { int countOG=0, i=0, j=0; do { + do { - cout << "Enter an integer from -50 to 50: "; - cin >> countOG; + cout << "Enter an integer from -50 to 50: "; + cin >> countOG; } while (countOG > 50 || countOG < -50); + int count=countOG; //Store original integer for comparison to break loop if (countOG < 0){ @@ -41,6 +43,7 @@ do { cout << endl; } } + } while (countOG != 0); cout << "Goodbye." << endl; return 0; diff --git a/ee1301/wk2/hw2_directory/strap012_2B.cpp b/ee1301/wk2/hw2_directory/strap012_2B.cpp index 02b5f7b..f300a04 100644 --- a/ee1301/wk2/hw2_directory/strap012_2B.cpp +++ b/ee1301/wk2/hw2_directory/strap012_2B.cpp @@ -5,7 +5,7 @@ Student ID number: 5449340 Course number: EE1301 Term: Spring 2019 Lab/assignment number: Homework 2B -Short Program Description: Pay Stub Calculator +Short Program Description: Time Calculator */ #include -- cgit v1.2.3