From e64d2e34d0f288d0769f6e0728adac8783d11b8f Mon Sep 17 00:00:00 2001 From: Alexander Abcarius Date: Wed, 13 Sep 2017 13:22:24 -0700 Subject: [PATCH] Fixed issue #1 & #2 1. Included iostream library. 2. Fixed if(a=b) with if(a==b) and added "else" if user corrected input to fit case. --- main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/main.cpp b/main.cpp index cf29c37..a15593a 100644 --- a/main.cpp +++ b/main.cpp @@ -1,10 +1,11 @@ +#include using namespace std; int main() { int num1; int num2; - bool repeat = false; + bool repeat=false; do { @@ -13,15 +14,19 @@ int main() cout<<"Enter another whole number: "; cin>>num2; - if( num1 = num2 ) + if(num1==num2) { cout<<"Numbers should be different!"; - repeat = true; + repeat=true; + } + else + { + repeat=false; } }while(repeat); cout<<"Increasing order: "; - if( num1 < num2 ) + if(num1