Added support for numbers.

This commit is contained in:
David Vereb 2019-11-13 16:26:32 -05:00
parent 8a446ba22a
commit f13245e484

View File

@ -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)
{
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;