I would like to output floating point numbers that include the thousands separators. In the US they would be commas",". For example, using %f with 12345.67 should yield "12,345.67". Is this possible without manually separating the number into strings? For example, can we set a locale that would specify the separators? Can we use printf to format the string correctly?
internally printf is used for most of the formatting.
I did not find any flag to print out the number in the US style.
Log in to post a comment.