wouldn't be hard at all..
there's some very simple ways of doing it but wouldn't be good programming. The only real thought would be on handling the tens in each number cluster (as like sixty-two needs to add a hyphen where sixty doesn't)
So a very basic and simple way would be like know your max number (say 999,999,999,999,999) or 999 trillion
you can just do a series of if statements like this:
generic c# exmaple
You'll first likely want to setup a string table that has (zero[this is important so you don't have to -1 all the time],one,two,three,four,five,six,seven,eight,nine)
outstring = '';
If (number >= 100 trillion)
{
tempnumber = number / 100 trillion;
number = number % 100 trillion;
outstring += tempstring[tempnumber] + 'hundred';
if (number < 1 trillion)
outstring += tempstring[tempnumber] + ' trillion';
}
if (number >= 10 trillion)
{
tempnumber = number / 10 trillion;
number = number % 10 trillion;
outstring += tempstring[tempnumber] + 'ty';
if (number >= 1 trillion)
outstring += '-';
else
outstring += ' trillion';
}
if (number >= 1 trillion)
{
tempnumber = number / 1 trillion;
number = number % 1 trillion;
outstring += tempstring[tempnumber] + ' trillion';
}
continue on through billions/mill/etc etc
-----signature-----