-->
当前位置:首页 > 题库

PROGRAMMING:Calculate Postage

Luz5年前 (2021-05-10)题库410
Input the weight of goods x (an integer), calculate the corresponding postage y and output it. The calculation formula is as follows:
If x is in the interval (0,5], then y = 10; if x is in the interval (5,10), then y = 15,
If x is in the interval (10,20), then y = 20.
###Input format:
Enter an integer.
###Output format:
Output an integer.
###Input sample 1:
```in
three
```
###Output sample 1:
```out
ten
```
###Input sample 2:
```in
six
```
###Output sample 1:
```out
fifteen
```
###Input sample 3:
```in
eighteen
```
###Output sample 3:
```out
twenty
```







answer:If there is no answer, please comment