@[zappler](/user/555075) 再看一遍题目吧,你题目理解错了
by Loser_Syx @ 2023-01-22 14:06:18
@[zappler](/user/555075) 而且保留一位小数
by Loser_Syx @ 2023-01-22 14:07:07
@[Saint_ying_xtf](/user/852144) 不就是求出电费吗
by you_are_a_idiot @ 2023-01-22 14:25:55
现在哪里错了
```cpp
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int n;
cin >> n;
double m = 0;
if(n <= 150) m = 0.4463 * n;
else if(n >= 151 && n <= 400) m = 0.4663 * n;
else m = n * 0.5663;
cout << setprecision(1) << m << endl;
return 0;
}
```
by you_are_a_idiot @ 2023-01-22 14:27:38
《阶梯计费你看见了吗》仔细读题
by Enoch006 @ 2023-01-22 14:29:48
@[zappler](/user/555075) 要分段计费
by Loser_Syx @ 2023-01-22 14:32:31
@[zappler](/user/555075) 不是说了分段计费?
by Enoch006 @ 2023-01-22 14:42:55
@[Enoch006](/user/538683) @[Saint_ying_xtf](/user/852144) 所以呢 哪里错了
by you_are_a_idiot @ 2023-01-22 14:44:59
你这叫分段计费?类似于这种的才叫!
```cpp
b=0.4463*150+0.4663*250+(k-400)*0.5663;
```
by Enoch006 @ 2023-01-22 14:46:12
@[zappler](/user/555075) 就是分成3个类别啊,你数学上没学过吗
by Loser_Syx @ 2023-01-22 14:50:17