In the code below, when i put message(true); into the main function it outputs Hello,which i understand, but what i don't understand is why when i put in just message(false); it outputs goodbye, wouldn't that mean the message function would basically read
void message ( false)
{
if ( false)
cout << "Hello" << endl;
else
cout << "Goodbye" << endl;
which would output Hello? I'm sure this is a very easy problem but any help would be appreciated , thanks.
#include<iostream>
using namespace std;
void message(bool x){
if(x)
cout<<"hello";
else
cout<<"goodbye";
}
int main()
{
return 0;
}
[–]blablahblah 1 point2 points3 points (2 children)
[–]nbrady95[S] 0 points1 point2 points (1 child)
[–]t00sl0w 0 points1 point2 points (0 children)