|
|
@ -1,8 +1,8 @@ |
|
|
|
## numofdigits |
|
|
|
## number of digits |
|
|
|
|
|
|
|
|
|
|
|
### Instructions |
|
|
|
### Instructions |
|
|
|
|
|
|
|
|
|
|
|
Write a function that returns number of digits in a nonnegative integer n. |
|
|
|
Write a function that returns a number of digits in a nonnegative integer n. |
|
|
|
- if you enter a negative input return 0. |
|
|
|
- if you enter a negative input return 0. |
|
|
|
|
|
|
|
|
|
|
|
### Expected function |
|
|
|
### Expected function |
|
|
@ -37,8 +37,8 @@ And its output : |
|
|
|
|
|
|
|
|
|
|
|
```console |
|
|
|
```console |
|
|
|
$ go run . |
|
|
|
$ go run . |
|
|
|
1$ |
|
|
|
1 |
|
|
|
3$ |
|
|
|
3 |
|
|
|
0$ |
|
|
|
0 |
|
|
|
3$ |
|
|
|
3 |
|
|
|
4$ |
|
|
|
4 |
|
|
|