I need to check the given integer whther comma used or not.
For example. If the user given 123456 The output should be like 123,456 If the user given 123,456 The output should be same as the input given(ex:123,456) If the user gives 123456.5 The output should be like 123,456.5
The comma has to be filled from the right side after 3 digits ex: 12345 output shoul be 12,345.
Please do the needful ASAP. Thamks in advance