Thanks for the explanation. This makes thing a lot clearer now!
Originally Posted by Salem
Oh, and it's not hard to get the tags right, especially if you take a moment to preview prior to posting.
Thanks for the tip Elysia, it makes perfect sense.
Originally Posted by Elysia
So this is the revised code, and it works fine. Any more tips and suggestions are most welcome. I am pleasantly surprised as to how helpful these forums have been.
using namespace std;
bool IsEven (int nValue)
return (nValue %2 == 0);
void PrintResult (int nResult)
cout<< "Your result is:" << nResult << endl;
int GetUserInput ()
cout << "Enter an integer" << endl;
cin >> nValue1;
int main ()
int nInput= GetUserInput ();
int nResult= IsEven (nInput);