Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please complete the following two short functions utilizing C++ format: 1. Write

ID: 3626243 • Letter: P

Question

Please complete the following two short functions utilizing C++ format:
1. Write the definition of a function isPositive , which 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.
2. Write the definition of a function isSenior , which receives an integer parameter and returns true if the parameter's value is greater or equal to 65, and false otherwise.

So if the parameter's value is 7 or 64 or 12 the function returns false. But if the parameter's value is 69 or 83 or 65 the function returns true.

Explanation / Answer

bool isPositive(int k)

{

if(k>0) return true;

return false;

}

bool isSenior(int k)

{

if(k>65) return true;

return false;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote