From aa2e397bec7d3d0db8d01f9cb50f0578dc56955e Mon Sep 17 00:00:00 2001 From: Laurin Date: Wed, 31 Jan 2024 00:52:45 +0100 Subject: [PATCH] fix added smaller equal sign in loop head --- src/conversionOfNumbers/conversionOfNumbers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conversionOfNumbers/conversionOfNumbers.c b/src/conversionOfNumbers/conversionOfNumbers.c index 9c77555..c71b53e 100644 --- a/src/conversionOfNumbers/conversionOfNumbers.c +++ b/src/conversionOfNumbers/conversionOfNumbers.c @@ -7,7 +7,7 @@ int binaryStrLen(int input){ int length; if(input > 0){ - for(int x = 0; x < input; x++){ + for(int x = 0; x <= input; x++){ if(pow(2,x) >= input + 1){ length = x; break;