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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started