Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that will prompt a user to enter three numbers of datatype double in main. The program will then call a function called

Write a program that will prompt a user to enter three numbers of datatype double in main.

The program will then call a function called calcAverage that includes all three numbers as parameters. The function will calculate the average of the three numbers and return that average(datatype double) to main.

The program will then print the average of the three numbers from main. The output should include the original numbers and the average (all formatted to two decimal places) and should look something like this:

The average of 4.25, 8.36, and 12.25 is 6.22

Test your program with these numbers:

6.85 5.24 8.64

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

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

More Books

Students also viewed these Databases questions

Question

Explain how plasmids can function as vectors.

Answered: 1 week ago

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago

Question

Explain the various techniques of Management Development.

Answered: 1 week ago

Question

How wide are Salary Structure Ranges?

Answered: 1 week ago