A company selling household appliances gives commissions to its salesman determined by the kind of product sold as well

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

A company selling household appliances gives commissions to its salesman determined by the kind of product sold as well

Post by answerhappygod »

A company selling household appliances gives commissions to its
salesman determined by the kind of
product sold as well as the sales amount.
Type 1: 7% of sale or 400, whichever is more.
Type 2: 10% of sale or 900, whichever is less.
Type 3: 12% of sale.
Type 4: P250, regardless of sale price.
Make a C program that would input name of the salesman, the KIND
of appliance sold (between 1-4) and
the sale PRICE (a positive floating-point value), and output the
Name of salesman and the commission
that the salesman will receive. (Use switch to
answer this problem)
Test Data 1
Enter name of salesman: Mary Jones
Enter Kind: 1
Enter Price: 10700
Output:
Salesman Name: Juan Cruz
Commission: 900
Test Data 2
Enter name of salesman: Juan Cruz
Enter Kind: 2
Output:
Salesman Name: Mary Jones
Commission: 400
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply