Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

14. The owner of Harrys Car Sales pays each salesperson a commission based on his or her quarterly sales. The sales ranges and corresponding commission

14. The owner of Harrys Car Sales pays each salesperson a commission based on his or her quarterly sales. The sales ranges and corresponding commission rates are shown in Figure 6-43. The program should display an error message if the sales amount is less than 0.

Figure 6-43

a. Create an IPO chart for the problem, and then desk-check the algorithm seven times, using sales of 20000, 20001, 30000, 50000, 50001, 75000, and 3.

b. List the input, processing, and output items, as well as the algorithm, in a chart similar to the one shown earlier in Figure 6-27. Then code the algorithm into a program.

I need help with the code for this program!

image text in transcribedimage text in transcribed

Quarterly sales ($) 0-20,000 20,001-50,000 Commission multiply the sales by 5% multiply the sales over 20,000 by 7% and then add 1,000 to the result multiply the sales over 50,000 by 10% and then add 3,100 to the result 50,001 or more Figure 6-43 C++ instructions char size = ''; char coupon = ''; IPO chart information Input size (Mor L) coupon status (y or N) Processing none Output price double price = 0.0; Algorithm: 1. enter the size 2. if (the size is not Mor L) display "Please enter either Mor L." else cout > size; size = toupper(size); if (size != 'M' && size != 'L') cout > coupon; if (toupper(coupon) == 'Y') price -= 2; //end if } //end if cout > size; size = toupper(size); if (size != 'M' && size != 'L') cout > coupon; if (toupper(coupon) == 'Y') price -= 2; //end if } //end if cout

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

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions

Question

2. Differentiate between agents and brokers.

Answered: 1 week ago