diff --git a/main.cpp b/main.cpp index 8b2261c..76e0b96 100644 --- a/main.cpp +++ b/main.cpp @@ -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("");