-5

I have an amount with different currencies, I want to convert an amount into words.suppose if i have a number 1000000, i have to print it for "Rupees ten lakh only" for india, "Dollar one million only" for usa etc...

Any suggestions would be great.

Thanks in advance, Msn

M.S.Naidu
  • 2,239
  • 5
  • 32
  • 56

2 Answers2

1

I'm going to take a stab in the dark and assume you're talking about String and int data types. To append the value of the int type onto the String use the String's method valueOf, for example:

String formattednumber = "$" + String.valueOf(amount);

In the future please provide more information to exactly you want and what you have tried, also code would be helpful.

Lee Fogg
  • 775
  • 6
  • 22
0

If you need to print numbers as words then this might be helpful.

same logic can be used to append currency name. hope that helps.

Community
  • 1
  • 1
Tala
  • 8,888
  • 5
  • 34
  • 38