From 843f76a7e9f2b89f645453d68027032118fea74c Mon Sep 17 00:00:00 2001 From: Takumi Nishida Date: Wed, 13 Sep 2017 14:50:33 -0700 Subject: [PATCH] Fixes Always says "Numbers should be different!" bug and fixes Warning and errors of implicitly-defined namespace --- main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index db351ef..ee192eb 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,5 @@ +#include + using namespace std; int main() @@ -13,7 +15,7 @@ int main() cout<<"Enter another whole number: \n"; cin>>num2; - if( num1 = num2 ) + if( num1 == num2 ) { cout<<"Numbers should be different!\n"; repeat = true;