mirror of
https://github.com/TheAlgorithms/Ruby
synced 2025-02-10 20:48:11 +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
|
temp = n
|
||||||
|
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return count + 1
|
return 1
|
||||||
end
|
end
|
||||||
|
|
||||||
until temp.zero?
|
until temp.zero?
|
||||||
|
|
Loading…
Add table
Reference in a new issue