Write the definition of a function isPositive, that receives an integer parameter and returns true if the parameter is positive, and false otherwise. So, if the parameter's value is 7 or 803 or 141 the function returns true. But if the parameter's value is -22 or -57, or 0, the function returns false.
.
.
Click on the title for the solution
.
.
bool isPositive (int x)
{if (x>0) return true;
else return false;}
.
Click on the title for the solution
.
.
This is the answer:
:
bool isPositive (int x)
{if (x>0) return true;
else return false;}
Comments
Post a Comment