feat: use shorter version of 100-s
This commit is contained in:
parent
3a574f9616
commit
8d3c8f2152
1 changed files with 5 additions and 2 deletions
7
main.cpp
7
main.cpp
|
@ -58,8 +58,11 @@ int main()
|
||||||
if (input > 99 /*input_length >= 3*/)
|
if (input > 99 /*input_length >= 3*/)
|
||||||
{
|
{
|
||||||
int last_digit = ((input % 1000) - middle_digit) / 100;
|
int last_digit = ((input % 1000) - middle_digit) / 100;
|
||||||
string suffix = "";
|
if (last_digit != 1)
|
||||||
result.push_back(first_digit_strings[last_digit] + "hundert" + suffix);
|
suffix = first_digit_strings[last_digit];
|
||||||
|
else
|
||||||
|
suffix = "";
|
||||||
|
result.push_back(suffix + "hundert");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
result.push_back("");
|
result.push_back("");
|
||||||
|
|
Loading…
Reference in a new issue