Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
13
Task/Loops-N-plus-one-half/Zig/loops-n-plus-one-half.zig
Normal file
13
Task/Loops-N-plus-one-half/Zig/loops-n-plus-one-half.zig
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
const std = @import("std");
|
||||
pub fn main() !void {
|
||||
const stdout_wr = std.io.getStdOut().writer();
|
||||
var i: u8 = 1;
|
||||
while (i <= 10) : (i += 1) {
|
||||
try stdout_wr.print("{d}", .{i});
|
||||
if (i == 10) {
|
||||
try stdout_wr.writeAll("\n");
|
||||
} else {
|
||||
try stdout_wr.writeAll(", ");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue