From 588962a00259f9b11f281d001ebbb35593123d86 Mon Sep 17 00:00:00 2001 From: Zeger Hendrikse Date: Thu, 7 Nov 2024 20:09:14 +0100 Subject: [PATCH] Code clean-up --- .../lcd-digits-kata/lcd-digits-dotnet/LcdDigits/LcdDigits.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kata-solutions/lcd-digits-kata/lcd-digits-dotnet/LcdDigits/LcdDigits.cs b/kata-solutions/lcd-digits-kata/lcd-digits-dotnet/LcdDigits/LcdDigits.cs index ce532ff..41cf7c6 100644 --- a/kata-solutions/lcd-digits-kata/lcd-digits-dotnet/LcdDigits/LcdDigits.cs +++ b/kata-solutions/lcd-digits-kata/lcd-digits-dotnet/LcdDigits/LcdDigits.cs @@ -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)); }