From fdf24256e225dbc1507fae067c83ca0ff4c9b157 Mon Sep 17 00:00:00 2001 From: myungjinbae Date: Wed, 13 Sep 2017 20:25:38 -0700 Subject: [PATCH] fix --- main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index db351ef..ddc56e2 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,4 @@ +#include using namespace std; int main() @@ -5,19 +6,21 @@ int main() int num1; int num2; bool repeat = false; - do { cout<<"Enter a whole number: \n"; cin>>num1; 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: ";