feat: use shorter version of 100-s

This commit is contained in:
moonleay 2024-11-20 18:43:38 +01:00
parent 3a574f9616
commit 8d3c8f2152
Signed by: moonleay
GPG key ID: 82667543CCD715FB

View file

@ -58,8 +58,11 @@ int main()
if (input > 99 /*input_length >= 3*/)
{
int last_digit = ((input % 1000) - middle_digit) / 100;
string suffix = "";
result.push_back(first_digit_strings[last_digit] + "hundert" + suffix);
if (last_digit != 1)
suffix = first_digit_strings[last_digit];
else
suffix = "";
result.push_back(suffix + "hundert");
}
else
result.push_back("");