I have a similar question to the one below When writing out large numbers in words, should commas be placed at thousand separators?
I'm writing a program to spell out large numbers, and am unsure if there should be a comma or an "and" in the following numerals, before the "24":
101024 "One hundred and one thousand, and twenty-four"
1024 "One thousand and twenty-four"
I think that this is rarely a problem in real life, but what would be the correct way of doing this?