-5

I want to a program in java that prints the number in word's. Can any body help me. Exp like suppose user give 123 then program will prints "one two three only".

Class Test {

}

Atul Rai
  • 332
  • 1
  • 10
  • 25
  • 3
    You need to provide example code showing your efforts and where you are having issues. This is not a homework request site. – pczeus Feb 26 '16 at 03:44

1 Answers1

0

basically you need to convert String to integer How to convert a String to an int in Java? then get over the numbers one by one How to get the separate digits of an int number? and create a switch on each digit and the switch add String of number to String

String final ="";
switch(num){
case'1': final = final+"one";break;
.
.    
.
.
etc
Community
  • 1
  • 1