Java Program to convert number to words | Converting Number to Words

preview_player
Показать описание
Java Program to convert number to words | Converting Number to Words

Code:

public class NumberToWordsInJava {

public static void main(String[] args) {
// TODO Auto-generated method stub
if(number 1|| number 9999) {
}else {
int a = number%10; //last digit
int b = number/10;
int c = b%10;
int g = number/100;
int d = g%10;
int e = number/1000;
String sD[] = {"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Ninteen"};
String ty[] = {"","Ten","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"};
String h = "Hundred";
String th = "Thousand";
if(number 20)
else if (number =20 && number 100)
else if(number =100 && number 999)
else

}
}

}

Chapters:
0:00 - Introduction to the video
0:21 - Program to convert 1 to 19 into words
3:29 - Program to convert 20 to 99 into words
8:49 - Program to convert 100 to 999 into words
11:04 - Program to convert 1000 to 9999 into words

Next Steps :

---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists

---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------

#java
#javaprogram
#javaprogramming
Рекомендации по теме
Комментарии
Автор

if the user inputs 119 it will output one hundred ten nine

ryanlala-harivony