diff --git a/maths/number_of_digits.rb b/maths/number_of_digits.rb index d2e1245..f14b567 100644 --- a/maths/number_of_digits.rb +++ b/maths/number_of_digits.rb @@ -5,7 +5,7 @@ def count_digits(n) temp = n if (n == 0) - return count + 1 + return 1 end until temp.zero?