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

PROGRAMMING:4.3 - rewrite countdown program (negative numbers do not perform line feed)

Luz5年前 (2021-05-10)题库481
Modify the program in code listing 4-5 to not wrap lines when the input value is negative.
-----From exercise 4-3
```
Please enter a positive integer: 5
5 4 3 2 1 0
```
```
Please enter a positive integer: 0
0
```
```
Please enter a positive integer: - 5
```
Note: when you enter a negative number, you will no longer output empty lines.
###Input example:
```in
-5
```
###Output example:
```out
Please enter a positive integer:
```







answer:If there is no answer, please comment