diff --git a/main.cpp b/main.cpp index d824e6b..f7fb51d 100644 --- a/main.cpp +++ b/main.cpp @@ -31,7 +31,7 @@ int main() vector result; string number_constructor = ""; - if (middle_and_right_digit < 11 || middle_and_right_digit > 12) + if ((middle_and_right_digit < 11 || middle_and_right_digit > 12) && middle_and_right_digit != 17) { // Handle everything else if (right_digit == 1) @@ -45,12 +45,14 @@ int main() // Handle 11 and 12 if (middle_and_right_digit == 11) number_constructor = "elf"; - else + else if (middle_and_right_digit == 12) number_constructor = "zwoelf"; + else + number_constructor = "siebzehn"; } result.push_back(number_constructor); - if ((input > 9 /*input_length > 1*/) && (middle_and_right_digit < 11 || middle_and_right_digit > 12)) + if ((input > 9 /*input_length > 1*/) && (middle_and_right_digit < 11 || middle_and_right_digit > 12) && middle_and_right_digit != 17) result.push_back(middle_digit_strings[middle_digit]); else result.push_back("");