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
A company selling household appliances gives commissions to its salesman determined by the kind of product sold as well
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am