C++ for Mac (Xcode) For this exercise, you will write a program that includes four function definitions....

60.1K

Verified Solution

Question

Programming

C++ for Mac (Xcode)

For this exercise, you will write a program that includes fourfunction definitions. You will also write a main() function thatcalls these four functions to demonstrate that they work asexpected.

The four functions are:

1. printExitMessage() : This function prints a message to thescreen saying something like \"Thanks for using this software.Goodbye.\"

2. getMin(): This function takes two float inputs and returnsthe lesser of the two float values. For example, if the argumentsto the function were -1.0f and 1.0f, it would return -1.0f.

3. getAbsoluteValue(): Takes an int argument, and returns theabsolute value of that int. If you don't know what absolute valueis, search for it on the web (it is really simple). Hint:multiplying by -1 will give you the positive version of a negativenumber.

4. isEven(): Takes an int argument and returns a bool value:true if the number is even, false if the number is odd. Hint: x % 2== 0 will be true if the number is even, false if odd.

Don't forget to call each of your four functions in main() tomake sure they work.

Answer & Explanation Solved by verified expert
4.1 Ratings (587 Votes)
include include    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students