0
function name ispositive which takes integer as an argument and returns true;if the argument is positive no are false otherwis
Please make a program
4 Antworten
+ 5
It's memdatory to add your attempt along with questions like these.
+ 3
bool ispositive(int x)
{
if(x>= 0)
{
return true;
}
else
{
return false;
}
}
If you want the function to return true or false as string and not boolean then change bool to string and return "true" or "false" respectively
+ 1
Thanks man....