fork download
  1. function getMilharNumber(n) -- critico
  2. return tostring(math.floor(n)):reverse():gsub("(%d%d%d)","%1."):gsub(",(%-?)$","%1"):reverse()
  3. end
  4.  
  5. print(getMilharNumber(1000000))
Success #stdin #stdout 0s 2832KB
stdin
Standard input is empty
stdout
1.000.000