Question: Goal. 1. To reinforce basic understanding of pointers, the (*) and (&) symbols Overview: Write a program, lab092.cpp, that will read monthly sales into a

 Goal. 1. To reinforce basic understanding of pointers, the (*) and

Goal. 1. To reinforce basic understanding of pointers, the (*) and (&) symbols Overview: Write a program, lab092.cpp, that will read monthly sales into a dynamically allocated array. The program will input the size of the array from the user. It will call a function that will find the yearly sum (the sum of all the sales). It will also call another function that will find the average. # include using namespace std; void yearTotal (float sales, int saleSize, float &sum) // function that calculates void yearAverage (float sum, int saleSize, float & avg) // yearly tota.l // function that calculates // average int main ) // Complete program here a) b) Use the sample run test data below to test your program. Make sure your program handles 0 sales being entered, and negative sales amounts Sample Run: Please input the number of monthly sales to be input Please input the sales for month 1 1290.89 Please input the sales for month 2 905.95 Please input the sales for month 3 1567.98 Please input the sales for month 4 994.83 The total sales for the year is $4759.65 The average monthly sale is $1189.91

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!