From f13245e484a8c95fcff4365b5e53104519bd3e3b Mon Sep 17 00:00:00 2001 From: David Vereb Date: Wed, 13 Nov 2019 16:26:32 -0500 Subject: [PATCH] Added support for numbers. --- main.cpp | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index afbbfa1..9c7e725 100644 --- a/main.cpp +++ b/main.cpp @@ -12,7 +12,44 @@ int main(int argc, char *argv[]) for(auto i = 1; i < argc; ++i) { for(auto j = 0; argv[i][j] != '\0'; ++j) - std::cout << ":regional_indicator_" << char(std::tolower(argv[i][j])) << ": "; + { + switch(argv[i][j]) + { + case 0: + std::cout << ":zero: "; + break; + case 1: + std::cout << ":one: "; + break; + case 2: + std::cout << ":two: "; + break; + case 3: + std::cout << ":three: "; + break; + case 4: + std::cout << ":four: "; + break; + case 5: + std::cout << ":five: "; + break; + case 6: + std::cout << ":six: "; + break; + case 7: + std::cout << ":seven: "; + break; + case 8: + std::cout << ":eight: "; + break; + case 9: + std::cout << ":nine: "; + break; + default: + std::cout << ":regional_indicator_" << char(std::tolower(argv[i][j])) << ": "; + break; + } + } std::cout << ":large_blue_diamond: "; } std::cout << std::endl;