chore: improved naming again
This commit is contained in:
parent
6263ad75a8
commit
cca6c716ab
1 changed files with 3 additions and 3 deletions
6
main.cpp
6
main.cpp
|
@ -1,6 +1,6 @@
|
||||||
#include "std_lib_inc.h"
|
#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"
|
"", "ein", "zwei", "drei", "vier", "fuenf", "sechs", "sieben", "acht", "neun"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ int main()
|
||||||
number_constructor = "s";
|
number_constructor = "s";
|
||||||
if (middle_digit > 1 && right_digit != 0)
|
if (middle_digit > 1 && right_digit != 0)
|
||||||
number_constructor = "und";
|
number_constructor = "und";
|
||||||
number_constructor = first_digit_strings[right_digit] + number_constructor;
|
number_constructor = right_digit_strings[right_digit] + number_constructor;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@ int main()
|
||||||
{
|
{
|
||||||
int left_digit = ((input % 1000) - middle_digit) / 100;
|
int left_digit = ((input % 1000) - middle_digit) / 100;
|
||||||
if (left_digit != 1)
|
if (left_digit != 1)
|
||||||
number_constructor = first_digit_strings[left_digit];
|
number_constructor = right_digit_strings[left_digit];
|
||||||
else
|
else
|
||||||
number_constructor = "";
|
number_constructor = "";
|
||||||
result.push_back(number_constructor + "hundert");
|
result.push_back(number_constructor + "hundert");
|
||||||
|
|
Loading…
Reference in a new issue