Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program in C, for a store, that asks the user to select one of the options below and you must use function pointers

Create a program in C, for a store, that asks the user to select one of the options below and you must use function pointers to call the users choice of function for options 1 through 7

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

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions