chore: improved naming again

This commit is contained in:
moonleay 2024-11-20 19:07:34 +01:00
parent 6263ad75a8
commit cca6c716ab
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -1,6 +1,6 @@
#include "std_lib_inc.h"
constexpr vector<string> first_digit_strings = {
constexpr vector<string> 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");