From 6263ad75a80f155726cac4a588a8330a8339f5d9 Mon Sep 17 00:00:00 2001 From: moonleay Date: Wed, 20 Nov 2024 19:03:17 +0100 Subject: [PATCH] chore: improved naming once more --- main.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/main.cpp b/main.cpp index 2468084..30f03fa 100644 --- a/main.cpp +++ b/main.cpp @@ -30,25 +30,25 @@ int main() const int middle_digit = ((middle_and_right_digit) - right_digit) / 10; vector result; - string number_construction = ""; + string number_constructor = ""; if (middle_and_right_digit < 11 || middle_and_right_digit > 12) { // Handle everything else if (right_digit == 1) - number_construction = "s"; + number_constructor = "s"; if (middle_digit > 1 && right_digit != 0) - number_construction = "und"; - number_construction = first_digit_strings[right_digit] + number_construction; + number_constructor = "und"; + number_constructor = first_digit_strings[right_digit] + number_constructor; } else { // Handle 11 and 12 if (middle_and_right_digit == 11) - number_construction = "elf"; + number_constructor = "elf"; else - number_construction = "zwoelf"; + number_constructor = "zwoelf"; } - result.push_back(number_construction); + result.push_back(number_constructor); if ((input > 9 /*input_length > 1*/) && (middle_and_right_digit < 11 || middle_and_right_digit > 12)) result.push_back(middle_digit_strings[middle_digit]); @@ -59,10 +59,10 @@ int main() { int left_digit = ((input % 1000) - middle_digit) / 100; if (left_digit != 1) - number_construction = first_digit_strings[left_digit]; + number_constructor = first_digit_strings[left_digit]; else - number_construction = ""; - result.push_back(number_construction + "hundert"); + number_constructor = ""; + result.push_back(number_constructor + "hundert"); } else result.push_back("");