diff --git a/main.cpp b/main.cpp index db351ef..c2f5aa7 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,7 @@ -using namespace std; +#include +using std::cin; +using std::cout; +using std::endl; int main() { @@ -13,11 +16,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: ";