Adding Commas [Traditional, 2010]
Bessie is working with large numbers N (1 <= N <= 2,000,000,000)
like 153920529 and realizes that the numbers would be a lot easier
to read with commas inserted every three digits (as is normally
done in the USA; some countries prefer to use periods every three
digits). Thus, she would like to add commas: 153,920,529 . Please
write a program that does this.
PROBLEM NAME: commas
INPUT FORMAT:
* Line 1: A single integer: N
SAMPLE INPUT (file commas.in):
153920529
OUTPUT FORMAT:
* Line 1: The integer N with commas inserted before each set of three
digits except the first digits (as traditionally done in many
cultures)
SAMPLE OUTPUT (file commas.out):
153,920,529