Ad
  • Custom User Avatar

    I think,
    insertting commas every 3 numbers is a method, but not a good one.
    format(price, ',d'), or something like that is clever but not a suitable one.
    It is the feature of finance respect of every 3 numbers a comma.
    format(price, ',d') solves it by chance.

    In my opinion, I used the recursion method. If you like it, you can check my code.
    Enjoy...

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution