Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Rani Singh   on Nov 21 In Java Category.

  
Question Answered By: Corey Jones   on Nov 21

write a switch -case statement
String result ="";

case 0: result+="zero";break;
case 1: result+="one"; break;
............................
case 19: result+="nineteen";break;
case 20: result+="twenty"; break;
case 30: result+="thirty";break;
case 40: result+="forty"; break;
..............................
case 100: result+="hundred";break;
case 1000: result+="thousan"; break;

and so on

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on problem of converting a number into words using double Or get search suggestion and latest updates.


Tagged: