I am currently an English teacher at some schools in Japan and recently my students have been learning how to write the numbers in words in English. For example, if they were given the number 12 they are learning to write 'twelve'.
One of the questions I set the students was to find the number with the longest length (in characters; 4 would be bigger than 10 because four has more characters than ten) and I wanted to be able to check the answers that the students gave me.
There are a lot of resources online for calculating the string associated with a
number however most of these resources use the American style; without 'and'. As
I am not American I wanted to use 'and', so I implemented my own itoa
method
that would take an integer input and return a string, that was hopefully the
correct way of writing the number in words in English.