guys i cant understand or even think of how i can start my program. I should input a number and convert it in words ..its so hard for me to understand how to do this because like what i have said im NEW here thank you
so i need to convert a number into words from "1" to "10,001" it will take me months if i will type it over and over again so is there any other way? this is what i did :
String words;
int num = Integer.parseInt(JOptionPane.showInputDialog("Enter Number"));
if (num == 1) {
words = "one";
} else if (num == 2) {
words = "two";
} else if (num == 3) {
words = "three";
} else if (num == 4) {
words = "four";
} else if (num == 5) {
words = "five";
} else if (num == 6) {
words = "six";
} else if (num == 7) {
words = "seven";
}
else {
words = "unidentified";
}
JOptionPane.showMessageDialog(null, "Translation in words = " + words);
}
}
thank you guys hope u can help me.