Access Millions of academic & study documents

A consignment shop accepts a product for sale and sets an initial pr

Content type
User Generated
Showing Page:
1/3
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
items owner receives 60 percent of the sale price, and the
shop gets 40 percent. Assume that the item does not sell
for 5 months. Assume that the following variables and
constants have been declared:
num price
num month
num priceReduction
num ownersCut
num shopsCut
num OWNERS_CUT_PERCENTAGE = 0.6
num SHOP_CUT_PERCENTAGE = 0.4
num MAX_MONTHS = 5
Using these, write pseudocode to
a) Allow the user to enter the products original price.
b) A while loop that, for each month that the item does not
sell, outputs:
i) the month number
ii) the price at the beginning of that month
iii) the price reduction for that month
iv) the price at the end of that month
c) Code to output the items final sale price, the owners
cut of that final sale price, and the shops cut
Solution
#include <stdio.h>

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/3
#include<conio.h>
void main()
{
int price;
char
str[30]={\"Jan\",\"Feb\",\"March\",\"April\",\"May\",\"June\",\"
July\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"};
int i=0;
float final price;
float owners_cut_percentage ocp=0.6;
float shop_cut_percentage scp=0.4;
int max_months=5;
float pr=price-(price*0.5);
printf(\"enter the price of the product\");
scanf(\"%d\ \",price);
printf(\"enter the month name\");
scanf(\"%s\",str);
printf(\"enter the month\");
while(i>0)
{
printf(\" the month number is%d\ \",i);
if(i==1)
printf(\"the price at the begining is %d\ \",price);
printf(\"the price at the end of the month%d\ \",pr);
i++;

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/3

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
A consignment shop accepts a product for sale and sets an initial price. Each month that the item doesn’t 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. Assume that the item does not sell for 5 months. Assume that the following variables and constants have been declared: num price num month num priceReduction num ownersCut num shopsCut num OWNERS_CUT_PERCENTAGE = 0.6 num SHOP_CUT_PERCENTAGE = 0.4 num MAX_MONTHS = 5 Using these, write pseudocode to a) Allow the user to enter the product’s original price. b) A while loop that, for each month that the item does not sell, outputs: i) the month number ii) the price at the beginning of that month iii) the price reduction for that month iv) the price at the end of that month c) Code to output the item’s final sale price, the owner’s c ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4