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

PROGRAMMING:4.12 - displays the number of digits of an integer

Luz5年前 (2021-05-10)题库409
Write a program to read a positive integer and display its digits.
Note: in code listing 4-10, the number of cycles of the while statement is the same as the number of no digits.
-----From exercise 4-11
```
Please enter a positive integer: 1963
The number of digits in 1963 is four.
```
###Input example:
```in
-3
one thousand nine hundred and sixty-three
```
###Output example:
```out
Please enter a positive integer: please do not enter a non positive integer.
Please enter a positive integer: the number of digits in 1963 is 4.
```







answer:If there is no answer, please comment