From cca6c716ab7f2e5dfedc6b5bc8915bdc451b1615 Mon Sep 17 00:00:00 2001 From: moonleay Date: Wed, 20 Nov 2024 19:07:34 +0100 Subject: [PATCH] chore: improved naming again --- main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.cpp b/main.cpp index 30f03fa..55e9812 100644 --- a/main.cpp +++ b/main.cpp @@ -1,6 +1,6 @@ #include "std_lib_inc.h" -constexpr vector first_digit_strings = { +constexpr vector right_digit_strings = { "", "ein", "zwei", "drei", "vier", "fuenf", "sechs", "sieben", "acht", "neun" }; @@ -38,7 +38,7 @@ int main() number_constructor = "s"; if (middle_digit > 1 && right_digit != 0) number_constructor = "und"; - number_constructor = first_digit_strings[right_digit] + number_constructor; + number_constructor = right_digit_strings[right_digit] + number_constructor; } else { @@ -59,7 +59,7 @@ int main() { int left_digit = ((input % 1000) - middle_digit) / 100; if (left_digit != 1) - number_constructor = first_digit_strings[left_digit]; + number_constructor = right_digit_strings[left_digit]; else number_constructor = ""; result.push_back(number_constructor + "hundert");