In order to improve the level of craftsmanship and increase sales revenue, a handicraft company has formulated product s

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

In order to improve the level of craftsmanship and increase sales revenue, a handicraft company has formulated product s

Post by answerhappygod »

In order to improve the level of craftsmanship and
increase sales revenue, a handicraft company has formulated
product sales rules. The rules are as follows (T: product production time
actual sales price, M: raw material price): T<2h, S-M 1.1
2h<-T<4, S-M*1.2
4h<-T<6h, S-M*1.3
6h<=T<8h, S-M*1.4
8h<-T<10h, S-M*1.5
10h<-T, S-M*1.6
For example: the raw material price of a certain commodity is 168 yuan
the production time is 3 hours, and the corresponding sales price is:
168 1.2-201.6 yuan.
Please design a program that calculates and displays the actual selling
price of an item
Require:
(1) Enter the commodity price (in yuan) and the production time; (2) Calculate and output the actual sales price of the product;
(3) The output format is required to be accurate to two decimal places
(assuming the input is 168, the output is: the actual sales price is 201.6
yuan).
Example: printf("%.2f", price) can make the value of price (float type)
accurate to two decimal places.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply