it will print out You are awesome! everytime your answer is 100. But it is not working everytime I enter something like 10 and 50 the answer will be 60 but it still prints out you are awesome. Why is that?
#include <iostream>
usingnamespace std;
int main()
{
int a;
int b;
int ans;
cout << "Enter a number and press ENTER! \n";
cin >> a;
cout << "Enter another number and press ENTER! \n";
cin >> b;
ans = a + b;
cout << "The answer is ";
cout << ans;
cout << "\n";
if(ans = 100) {
cout << "You are awesome! \n \n";
}
return 0;
}