From 07f1bf67557dc9b6b661a0b8294c956b053cd9b9 Mon Sep 17 00:00:00 2001 From: Spenser Knudsen Date: Wed, 13 Sep 2017 17:47:25 -0700 Subject: [PATCH] fixed infinite loop and fixed error of implicitly defined namespace --- main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.cpp b/main.cpp index db351ef..325a577 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,5 @@ using namespace std; +#include int main() { @@ -18,6 +19,10 @@ int main() cout<<"Numbers should be different!\n"; repeat = true; } + else + { + repeat = false; + } }while(repeat); cout<<"Increasing order: ";