Format the given number into an American currency format

Convert a given number into the formatted number.


  • Traverse the┬ástring in the reverse order

  • Consider the following cases :

  • Positive numbers,

  • Negative numbers,

  • Positive floating point numbers,

  • Negative floating point numbers



You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *