评阅教师 | 得力 --- (30 points) In order to improve the level of craftsmanship and increase sales revenue, a handicraft compan
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
评阅教师 | 得力 --- (30 points) In order to improve the level of craftsmanship and increase sales revenue, a handicraft compan
评阅教师 | 得力 --- (30 points) 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, SEM*1.2 4h<=T<6h, SEM*1.3 6h<=T<8h, S-M*1.4 8h<=T<10h, S-M*1.5 10h<=T, SEM*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. Please input Price and time: 168 2 Price is:201. 60 Process exited after 5. 68 seconds with return value 0 请按任意键继续. 2. (25 points) Design a program to display all integers in range[ 2, 1000) th have 5 factors besides 1 and itself. E.g 64's factors are 2,4,8,16,32 besides 1 and 64; 18's factors are 2,3,6,9 besides 1 and 18.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!