In the real world, functions are mathematical representations of input-output situations. A vending machine is one such example. The input is the money combined with the selected button. The output is the product. Here is another example: The formula for converting a temperature from Fahrenheit to Celsius is a function expressed as: C = (5/9)*(F - 32), where F is the Fahrenheit temperature and C is the Celsius temperature. If it is 77 degrees Fahrenheit in Phoenix Arizona, then what is the equivalent temperature on the Celsius thermometer? Our input is 77. C = (5/9)*(77 - 32) C = (5/9)*(45) C = 25 The equivalent temperature is 25 degrees Celsius. To complete the Discussion activity, please do the following: Choose your own function or choose from the list below and then provide a unique example of a function and evaluate the function for a specific input (like the example above). Arm length is a function of height. The circumference of a circle is a function of diameter. The height of a tree is a function of its age. The length of person's shadow on the ground is a function of his or her height. Weekly salary is a function of the hourly pay rate and the number of hours worked. Compound interest is a function of initial investment, interest rate, and time. Supply and demand: As price goes up, demand goes down.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 14PE
icon
Related questions
Question

In the real world, functions are mathematical representations of input-output situations. A vending machine is one such example. The input is the money combined with the selected button. The output is the product.

Here is another example: The formula for converting a temperature from Fahrenheit to Celsius is a function expressed as:

C = (5/9)*(F - 32), where F is the Fahrenheit temperature and C is the Celsius temperature.

If it is 77 degrees Fahrenheit in Phoenix Arizona, then what is the equivalent temperature on the Celsius thermometer?

Our input is 77.

C = (5/9)*(77 - 32)

C = (5/9)*(45)

C = 25

The equivalent temperature is 25 degrees Celsius.

To complete the Discussion activity, please do the following:

Choose your own function or choose from the list below and then provide a unique example of a function and evaluate the function for a specific input (like the example above).

Arm length is a function of height.

The circumference of a circle is a function of diameter.

The height of a tree is a function of its age.

The length of person's shadow on the ground is a function of his or her height.

Weekly salary is a function of the hourly pay rate and the number of hours worked.

Compound interest is a function of initial investment, interest rate, and time.

Supply and demand: As price goes up, demand goes down.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning