In: Computer Science
Design a program using pseudocode to produce a report showing recommended sale prices. The program should ask the user to enter the item number, last sale date, number of items on hand, current date, item cost and the regular selling price. The program will output the item number, last sale date, days elapsed, number of item on hand, item cost, regular selling price and sales price. If the item has not been placed on sale for the last 30 days, the discount is 10% If the item has not been placed on sale for the last 31 to 60 days, the discount is 20% If the item has not been placed on sale for the last 61 to 90 days, the discount is 40% If the item has not been placed on sale in over 90 days, the discount is 50%
how can answer this question in the easiest way and simple way possible
PSEUDOCODE:
This program is used to produce a report showing recommended sale prices.
FUNCTION CalcSale
Pass In: item_number, last_sale_date, no_items_on_hand, current_date, item_cost,
reg_selling_price
COMPUTE days_elapsed as current_date - last_sale_date
IF day_elapsed is greater than 90 then
COMPUTE sales_price as reg_selling_price * .50
ELSE day_elapsed is greater than 60 and less than or equal to 90 then
COMPUTE sales_price as reg_selling_price * .60
ELSE day_elapsed is greater than 30 and less than or equal to 60 then
COMPUTE sales_price as reg_selling_price * .80
ELSE
COMPUTE sales_price as reg_selling_price * .90
ENDIF
Call Function: DisplayOutput with item_number, last_sale_date, days_elapsed,
no_items_on_hand, item_cost, reg_selling_price, sales_price
Endfunction
FUNCTION DisplayOutput
Pass In: item_number, last_sale_date, days_elapsed, no_items_on_hand, item_cost,
reg_selling_price, sales_price
PRINT "Item Number: ", item_number
PRINT "Last Sale Date: ", last_sale_date
PRINT "Days Elapsed: ", days_elapsed
PRINT "Number of items on hand: ", no_items_on_hand
PRINT "Item cost: ", item_cost
PRINT "Regular Selling Price: ", reg_selling_price
PRINT "Sale Price: ", sales_price
Endfunction
FUNCTION Main
PRINT "Enter the item number, last sale date, number of items on hand,
current date, item cost and the regular selling price: "
INPUT item_number from the user
INPUT last_sale_datefrom the user
INPUT no_items_on_hand from the user
INPUT current_date from the user
INPUT item_cost from the user
INPUT reg_selling_price from the user
Call Function: CalcSale with item_number, last_sale_date, no_items_on_hand,
current_date, item_cost, reg_selling_price
Endfunction