Skip to content

Commit

Permalink
Code clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
zhendrikse committed Nov 7, 2024
1 parent 80bbae1 commit 588962a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public static string[] NumberAsString(int number)
for (int i = 1; i < size; i++)
power *= 10;

if (number < 10)
return ConvertToSingleDigitStringArray(number / power);
if (power == 1)
return ConvertToSingleDigitStringArray(number);
else
return AddDigits(ConvertToSingleDigitStringArray(number / power), NumberAsString(number % power));
}
Expand Down

0 comments on commit 588962a

Please sign in to comment.