Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ Create a function that accepts four double values as parameters. These four double values should NOT modify the related values in main. The function

c++

Create a function that accepts four double values as parameters. These four double values should NOT modify the related values in main. The function should return the minimum of the four values, maximum of the four values, and average of the four values. Hint: Remember pass-by-reference to return multiple values your function should have seven parameters and a return type of void.

In main, ask the user to enter the four values, and then print the minimum, maximum and average. Your function should NOT print anything or read in anything (no cin/cout), only main.

Test Case 1:

Please enter four numbers:

Number 1: <4.6>

Number 2: <3.7>

Number 3: <-1.7>

Number 4: <-7.8>

Minimum is -7.8

Maximum is 4.6

Average is -0.3

Test Case 2:

Please enter four numbers:

Number 1: <-7.8>

Number 2: <3.7>

Number 3: <-1.7>

Number 4: <4.6>

Minimum is -7.8

Maximum is 4.6

Average is -0.3

Test Case 3:

Please enter four numbers:

Number 1: <5.3>

Number 2: <5.3>

Number 3: <5.3>

Number 4: <5.3>

Minimum is 5.3

Maximum is 5.3

Average is 5.3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago