Loops/N plus one half

fn main() {
    for i in 1..=10 {
        print "{i}";
        let s = i < 10 ? ", " : "\n"
        print "{s}"
    }
}

Output:

1, 2, 3, 4, 5, 6, 7, 8, 9, 10

Attribution: This is a community solution for the Rosetta Code task Loops/N plus one half in Zen C.

This article uses material from the Rosetta Code article Loops/N plus one half, which is released under the GNU Free Documentation License 1.3. A list of the original authors can be found in the page history.