Question: Create a program in C, for a store, that asks the user to select one of the options below and you must use an array

Create a program in C, for a store, that asks the user to select one of the options below and you must use an array of function pointers to call the users choice of function for options 1 through 7 (no need to code the functions below, only the array of function pointers):

1. Determine and print total revenue. This is calculated as the sum of retail price * retail quantity for all items.

2. Determine and print total sale cost. This is calculated as the sum of sale price * sale quantity for all items

3. Determine and print the current investment. This is calculated as the sum of sale price * (sale quantity retail quantity).

4. Determine and print profit. This is total revenue (#1) minus total sale cost (#2) plus cost of current investment (#3).

5. Determine and print total number of sales. This is calculated as the sum of the retail quantity.

6. Determine and print average profit per sale. This is profit (#4) divided by total number of sales (#5).

7. Print items in stock. This function should print each item into a list.

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!