Im having a problem with this function. I'm trying to make a simple program to test it out (Cause i just started learning C++ Yesterday) But it keeps messing up. Help!
Heres the program
Code:
#include <iostream>
using namespace std;
int main()
{
int number;
cout<<"Please enter in 5: \n";
cin>> number;
cin.ignore();
if ( number == 5 ) {
cout<<"Yay. You entered in 5\n";
}
if ! ( number == 5); { //HERES THE PROBLEM
cout<<"THAT IS NOT 5. YOU LOSE.\n";
}
cin.get();
}
I'm just a beginner, so im not good at trouble shooting.