comma format by cgy4ever

#include<iostream>\x0d
#include<string>\x0d
using namespace std;\x0d
\x0d
int main()\x0d
{\x0d
    string s;\x0d
    while(cin>>s)\x0d
    {\x0d
        for(int i = 0 ; i < s.length() - 1 ; i++)\x0d
        {\x0d
            cout<<s[i];\x0d
            if((s.length() - 1 - i) % 3 == 0)\x0d
                cout<<",";\x0d
        }\x0d
        cout<<s[s.length() - 1]<<endl;\x0d
    }\x0d
    return 0;\x0d
}\x0d

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page