From 8192ee1025931fe87cd659b4808847b106bd9698 Mon Sep 17 00:00:00 2001 From: JulianToya Date: Wed, 13 Sep 2017 15:23:12 -0700 Subject: [PATCH 1/2] Fixed bug #1 by including iostream --- main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index db351ef..41f8da9 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,4 @@ +#include using namespace std; int main() @@ -13,11 +14,14 @@ int main() cout<<"Enter another whole number: \n"; cin>>num2; - if( num1 = num2 ) + if( num1 == num2 ) { cout<<"Numbers should be different!\n"; repeat = true; } + else { + repeat = false; + } }while(repeat); cout<<"Increasing order: "; From 94ea12d6b2752fc4f331407cade80146c7ec3e8a Mon Sep 17 00:00:00 2001 From: JulianToya Date: Wed, 13 Sep 2017 15:54:47 -0700 Subject: [PATCH 2/2] Fixed bug #2 by modifying if loop --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 41f8da9..5071dd6 100644 --- a/main.cpp +++ b/main.cpp @@ -19,7 +19,8 @@ int main() cout<<"Numbers should be different!\n"; repeat = true; } - else { + else + { repeat = false; } }while(repeat);