fork download
    #include<stdio.h>
    int main()
    {
        char line[1024], *beg, *end;
        long readvalue;
        while (fgets(line, sizeof(line), stdin)) 
        {
            beg = line;
            for (beg = line; ; beg = end) 
            {
                readvalue = strtol(beg, &end, 10);
                if (beg == end)
                    break;
                    printf("[%d]",readvalue);
            }
        }
        return 0;
    }
Success #stdin #stdout 0.01s 1724KB
stdin
1 3 5 7 8 10 11 -1
stdout
[1][3][5][7][8][10][11][-1]