Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A consignment shop accepts a product for sale and sets an initial price. each mo

ID: 642619 • Letter: A

Question

A consignment shop accepts a product for sale and sets an initial price. each month that the item doesnt sell, the price is reduced by 20 percent. When the item sells, the item's owner receives 60 percent of the sale price, and the shop gets 40 percent. Draw a flow chart or write pseudocode to represent the logic of a program that aloows the user to enter an original product price. The output is the sale price, the owner's cut, and the shop's cut each month for the first three months the item is on sale.

This is a programming logic and design question. your help is greatly appreciated.

Explanation / Answer

set initialPrice = <input from user>

set salePrice = 0

take flag variable = false; //this becomes true once the item is sold

(Loop until flag is not true) {

if(month is over) {

initialPrice = initialPrice - 20%;

output shopCutPrice = initialPrice;

}

if(itemSold) {

flag=true;

salePrice = initialPrice;

}

}

output salePrice;

output ownerCut = 60% * salePrice;

//END

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote