Given a variable between 0 and 2,000,000 how to print out with proper commas
Eg;if we input 12345 the output should be 12,345
Given a variable between 0 and 2,000,000 how to print out with proper commas
Eg;if we input 12345 the output should be 12,345
The input should be a string. Then counting the number of spaces form the end instead of the beginning, add the commas in the places.
Or something like that.
SoKrA-BTS "Judge not the program I made, but the one I've yet to code"
I say what I say, I mean what I mean.
IDE: emacs + make + gcc and proud of it.