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 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ee1301/wk2/hw2_directory/strap012_2A.cpp') 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; -- cgit v1.2.3