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");