Another logic to do this.
Change your double value to
String value, separeate the integer part from string, then pick from the first characters.
Make two String Arrays:
1) for numbers in words from "One" to "Ninty Nine".
2) for units "Hundreds" to so on as many u want....
check if the length is divisible by 3 or not
if yes then pick only one character from string, change it to integer and access direct to the number string array("One..."Ninty Nine"), check also for length remaining after every interation of the loop.
Pick the
unit value from loop for(int loop=number.length/2
.
Ahmer Arman