Question: C Program Write a function named retailSales() that will allow the user to enter in the total retail sales for each month of the year.

C Program

Write a function named retailSales() that will allow the user to enter in the total retail sales for each month of the year. Use an array of pointers for the months. Add the function to your driver program. Use a declared, but uninitialized array of floats for the sales. You are creating a parallel array. Each element in the month array will be matched with a corresponding element in the sales array. When stepping through the arrays, please use subscripts for the sales array and pointers for the months array. Here is what the prompts and input should look like:

Please enter sales for January: 56987.45 Please enter sales for February: 78986.98 Please enter sales for March: 98975.33 etc....

Here is what the output should look like:

Month: Sales: January $56987.45 February $78986.98 March $98975.33 etc....

Put a comment to the side of each line explaining what that line of code accomplishes.

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!