124k views
2 votes
Define a function called isSenior that takes a parameter containing an integer value and returns True if the parameter is greater than or equal to 65, and False otherwise.

1 Answer

4 votes

Answer:

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 .

My Code:

bool is Positive ( int x ) {

if ( x > 0 )

{

return true;

}

else {

return false ;

}

}

User Levarne Sobotker
by
6.7k points