From 9c1924263a1e048330f52730f9f9e93c894bac66 Mon Sep 17 00:00:00 2001 From: INNA Date: Thu, 8 Feb 2024 20:12:40 +0100 Subject: [PATCH] =?UTF-8?q?refactoring:=20Vereinfachung=20der=20Bin=C3=A4r?= =?UTF-8?q?umwandlungsschleife?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/decbinary.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/decbinary.c b/src/decbinary.c index cc3b003..1f1d951 100644 --- a/src/decbinary.c +++ b/src/decbinary.c @@ -8,9 +8,8 @@ int dezimal_zu_binär(int dezimalzahl) { int i = 0; while (dezimalzahl > 0) { - binärzahl[i] = dezimalzahl % 2; + binärzahl[i++] = dezimalzahl % 2; dezimalzahl /= 2; - i++; } return i;