Question: 3. Write a program with two functions: One called absolute value that accepts a float parameter and returns the absolute value of the number.
3. Write a program with two functions: One called absolute value that accepts a float parameter and returns the absolute value of the number. Another called difference that accepts two float parameters and uses the absolute value function to return the absolute value of the difference between the two parameters. Call each function, and print the results, at least 3 times from the main function with various numbers to show that they work correctly. Be sure to declare the functions with appropriate return types.
Step by Step Solution
There are 3 Steps involved in it
Answer include iostream Function to calculate the absolute value of a float numb... View full answer
Get step-by-step solutions from verified subject matter experts
