mirror of
https://github.com/TheAlgorithms/Ruby
synced 2025-01-29 20:34:27 +01:00
Update maths/number_of_digits.rb
Co-authored-by: Vitor Oliveira <vbrazo@gmail.com>
This commit is contained in:
parent
3a52ac6e77
commit
b54b43f68b
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ def count_digits(n)
|
|||
temp = n
|
||||
|
||||
if (n == 0)
|
||||
return count + 1
|
||||
return 1
|
||||
end
|
||||
|
||||
until temp.zero?
|
||||
|
|
Loading…
Add table
Reference in a new issue