Posts

Showing posts with the label number to words in java

How to convert the Math Number to Words in Java?

How to convert the Math Number to Words in Java import java.util.*; public class NumToWords {     String string;     String st1[] = { "", "one", "two", "three", "four", "five", "six", "seven",             "eight", "nine", };     String st2[] = { "hundred", "thousand", "lakh", "crore" };     String st3[] = { "ten", "eleven", "twelve", "thirteen", "fourteen",             "fifteen", "sixteen", "seventeen", "eighteen", "ninteen", };     String st4[] = { "twenty", "thirty", "fourty", "fifty", "sixty", "seventy",             "eighty", "ninty" };     public String convert(int number) {         int n = 1;         int word;         string = "";     ...