Write the definition of a function isEven, that receives an integer parameter and returns true if the parameter's value is even, and false otherwise. So, if the parameter's value is 7 or 93 or 11 the function returns false. But if the parameter's value is 44 or 126 or 7778 the function returns true.
.
.
Click on the title for the solution
.
.
bool isEven (int x)
{if (x%2==0) return true;
else return false;}
.
Click on the title for the solution
.
.
This is the answer:
:
bool isEven (int x)
{if (x%2==0) return true;
else return false;}
Comments
Post a Comment