Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A online retailer has hired you to write a program to calculate the total cost of a customer's order. First, the retailer must enter the

image text in transcribedimage text in transcribed

A online retailer has hired you to write a program to calculate the total cost of a customer's order. First, the retailer must enter the name and the price per unit for two different candies. Then, the customer is allowed to order as many units of each of the two candies as they would like. Lastly, an invoice (report) is generated (displayed to the screen under the following rules: 1. All units up to and including the 20th are sold at full price. 2. All unit in excess of 20 are sold at a 10% discount. 3. For each candy there must be a separate line indicating: The candy's name The candy's full unit price How many units are being sold at full unit price The resulting subtotal And if applicable, another line indicating The candy's name o The candy's discounted unit price How many units are being sold at discounted unit price The resulting subtotal 4. There must be a line indicating the total of the order. 5. There must be a line indicating the sales tax on the total of the order (based on a 5% sales tax) 6. There must be a line indicating the grand total of the order. Outline: 1 Create a text file in your UNIX account programo9.c 2. Edit your programm09.c file to contain your C source code Save your programog.c file 4 Compile your program09.c file (repeating steps 2-4 until it compiles without error Run/Test the resulting aout file A You really need to run your program a number of times to do this thoroughly

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago