From 5bf286ee4be20a6474ea6b6ffeaf12b68a901cc3 Mon Sep 17 00:00:00 2001 From: Aaron Shaffer Date: Wed, 13 Sep 2017 13:56:37 -0700 Subject: [PATCH] fixes main.cpp resolves missing include, = instead of == and, adds termination condition for loop --- main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index db351ef..f0e33bd 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,5 @@ +#include //cout,cin + using namespace std; int main() @@ -13,11 +15,15 @@ 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: "; @@ -32,4 +38,3 @@ int main() return 0; } -