Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The program is to get a list of numbers from the user and prints a report that shows the numbers followed by the total and

image text in transcribedimage text in transcribed

The program is to get a list of numbers from the user and prints a report that shows the numbers followed by the total and average. Complete the unfinished functions using pointers. You may need to read Chapter 9 on Pointers in the Gaddis textbook. Using the input: 7 45.25 49.38 12.75 123.5 8.25 19.95 145.7 The output should be exactly as follows: # Amount 0 w NP + in 45.25 49.38 12.75 123.50 8.25 19.95 145.70 404.78 57.83 6 Total Average #include #include using namespace std; #include #include using namespace std; void printReport(const double *, int); void tota LandAverage(const double *, int, double *, double *); int main() { 1/ Get count and numbers from user int count {0}; cin >> count; double *ptr = new double [count] {0.0}; for (int index = 0; index > ptr[index]; } printReport(ptr, count); delete [] ptr; return 0; } //* 1/* printReport: This funtion prints the given list of numbers and statistics. //* //* Parameters list - pointer to the first element in the list size - the number of elements in the list void printReport(const double *list, int size) { // Write your code here. } 1/* tota LandAverage: This function calculates the total and average of a given list of real numbers. The results are returned through output parameters. //* Parameters list - pointer to the first element in the list size - the number of elements in the list totPtr - (output) pointer to the caller's total variable avePtr - (output) pointer to the caller's average variable void tota lAndAverage(const double *list, int size, double *totPtr, double *avePtr) { // Write your code here. }

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

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

Students also viewed these Databases questions

Question

1 . Television News channels importantance of our Life pattern ?

Answered: 1 week ago

Question

1. How is the newspaper help to our daily life?

Answered: 1 week ago

Question

1. Prepare a short profile of Mikhail Zoshchenko ?

Answered: 1 week ago

Question

What is psychology disorder?

Answered: 1 week ago