#include <iostream>
using namespace std;
int main()
{
int a;
cout<<"Enter a number";
cin>>a;
[B]if(a=5)[/B]
{
cout<<"Five";
}
else
{
cout<<"Not Five";
}
}
When I use the assignment, the result is always "five". I understand that a is assiged 5, but there is no statement to check for that. Does the "if" condition execute simply because it has an invalid argument?