From 19a613551a081429afe5be00421562a11f0c75a7 Mon Sep 17 00:00:00 2001 From: Cory Joseph Date: Wed, 13 Sep 2017 15:29:43 -0700 Subject: [PATCH 1/2] Bug Fixes Fixed various issues such as not including iostream and an infinite loop after entering in two of the same numbers. Also a boolean syntax error in an if statement. --- main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index db351ef..f0121d9 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,4 @@ +#include using namespace std; int main() @@ -13,11 +14,13 @@ 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 e06b2faac0912759607079e6c3b7f96dbcc66c48 Mon Sep 17 00:00:00 2001 From: Cory Joseph Date: Wed, 13 Sep 2017 15:38:14 -0700 Subject: [PATCH 2/2] fixed namespace warning --- main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index f0121d9..c2f5aa7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,5 +1,7 @@ #include -using namespace std; +using std::cin; +using std::cout; +using std::endl; int main() {