0 Members and 3 Guests are viewing this topic.
seven hundred three thousand four hundred fifty is 41fourty-one is 9nine is 4four is magic
My output currently looks like this (for input 703450):Code: [Select]seven hundred three thousand four hundred fifty is 41fourty-one is 9nine is 4four is magicThe aspects I'm not sure about are these:- Do I need a period at the end? (2-6 additional bytes, depending on language, so not too bad)- Is the correct number written out in letters, or should I mangle the other one instead, or both?- Do I need an upper-case letter at the start of each line? (That would be a pain to do!)- The spaces and dashes should not be counted, right?
Okay then, my SysRPL, Java and C entries are done. My fourth question was actually meant in a different way ("thirty-one" is 10 chars, but all the examples look like we shall count the 9 letters only), but your answer reminded me that the dash can be replaced by a space, simplifying my programs a little. Thanks for that. By the way: "forty" or "fourty"? I hope the latter is acceptable (despite my spell-checker complaining about it ... English is not my first language) because the former would break my concept of reusing the same lookup table for 13-19 and 2x-9x, and "forteen" looks just wrong.