6 kyu

Grouped by commas

3,623 of 10,725agram

Description:

Finish the solution so that it takes an input n (integer) and returns a string that is the decimal representation of the number grouped by commas after every 3 digits.

Assume: 0 <= n <= 2147483647

Examples

       1  ->           "1"
      10  ->          "10"
     100  ->         "100"
    1000  ->       "1,000"
   10000  ->      "10,000"
  100000  ->     "100,000"
 1000000  ->   "1,000,000"
35235235  ->  "35,235,235"
Algorithms

Similar Kata:

More By Author:

Check out these other kata created by agram

Stats:

CreatedNov 2, 2013
PublishedNov 2, 2013
Warriors Trained15599
Total Skips1089
Total Code Submissions33250
Total Times Completed10725
Ruby Completions1166
JavaScript Completions3908
Haskell Completions293
Python Completions3623
R Completions173
Scala Completions156
C# Completions564
Julia Completions36
C Completions201
NASM Completions20
PHP Completions375
C++ Completions539
COBOL Completions5
Total Stars181
% of votes with a positive feedback rating93% of 1191
Total "Very Satisfied" Votes1041
Total "Somewhat Satisfied" Votes126
Total "Not Satisfied" Votes24
Ad
Contributors
  • agram Avatar
  • jhoffner Avatar
  • ktornwall Avatar
  • bkaes Avatar
  • Unnamed Avatar
  • GiacomoSorbi Avatar
  • natan Avatar
  • anter69 Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • Souzooka Avatar
  • rowcased Avatar
  • mentalplex Avatar
  • FArekkusu Avatar
  • hobovsky Avatar
  • uniapi Avatar
  • xavierguihot Avatar
  • stellartux Avatar
  • user8436785 Avatar
  • DemisVi Avatar
  • akar-0 Avatar
  • Just4FunCoder Avatar
  • saudiGuy Avatar
Ad