Four is the number of letters in the ...: Difference between revisions
Content added Content deleted
(Added C++ solution) |
m (const correctness fix) |
||
Line 63: | Line 63: | ||
}; |
}; |
||
number_names small[] = { |
const number_names small[] = { |
||
{ "zero", "zeroth" }, { "one", "first" }, { "two", "second" }, |
{ "zero", "zeroth" }, { "one", "first" }, { "two", "second" }, |
||
{ "three", "third" }, { "four", "fourth" }, { "five", "fifth" }, |
{ "three", "third" }, { "four", "fourth" }, { "five", "fifth" }, |
||
Line 74: | Line 74: | ||
}; |
}; |
||
number_names tens[] = { |
const number_names tens[] = { |
||
{ "twenty", "twentieth" }, { "thirty", "thirtieth" }, |
{ "twenty", "twentieth" }, { "thirty", "thirtieth" }, |
||
{ "forty", "fortieth" }, { "fifty", "fiftieth" }, |
{ "forty", "fortieth" }, { "fifty", "fiftieth" }, |
||
Line 87: | Line 87: | ||
}; |
}; |
||
named_number named_numbers[] = { |
const named_number named_numbers[] = { |
||
{ "hundred", "hundredth", 100 }, |
{ "hundred", "hundredth", 100 }, |
||
{ "thousand", "thousandth", 1000 }, |
{ "thousand", "thousandth", 1000 }, |