In: Computer Science
Design the logic in pseudocode for Bugz App software company
that sells a software package
as follows.
1. The retail price of the package is $99
2. Quantity discounts are given on purchases of 10 or more units as
follows The program
must allow the user to enter the customer’s name and number of
units purchased, and
output the original cost of the units purchased, the percentage
discount given, the dollar
amount of the discount given, and the final cost after
discount.
1. If the customer purchases up to 19 units, they receive a
discount of 20%
2. 20 to 49 units – discount of 30%
3. 50 to 99 units – discount of 40%
4. 100 or more units – discount of 50%
Thanks for the question. Here is the completed code for this problem. Comments are included, go through it, learn how things work and let me know if you have any doubts or if you need anything to change. If you are satisfied with the solution, please rate the answer. Thanks =========================================================================== ======================= PSEUDO CODE GIVEN BELOW ======================= // set the price per unit retail_price=99 // create a variable discount with value as 0 discount=0 //ask name and units from user name = INPUT('Enter customer name: ') units = INPUT('Enter number of units to be purchased: ')) // check the units are not negative if (units<=0){ print('Invalid number') } else{ // find out the discount to be given if (units<=19) { discount=20 } else if (units<=49){ discount=30 } else if (units<=99){ discount=40 } else{ units=50 } //calculations are done below original_cost=units*retail_price total_discount=original_cost*discount/100 net_cost=original_cost-total_discount OUTPUT('Original Cost: $',original_cost) OUTPUT('Discount : ',discount,"%") OUTPUT('Total Discount: $',total_discount) OUTPUT('Final Cost: $',net_cost) }