From fe4c1e876b576977c64a639fb431f0ac0967f329 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 13 Sep 2017 20:56:45 -0700 Subject: [PATCH] Addresses iostream issues and output error "Numbers should be different" --- main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index db351ef..587c0e3 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,5 @@ +#include + using namespace std; int main() @@ -13,11 +15,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: ";