Jump to content

Loops/For: Difference between revisions

Zig sorted alphabetically before zkn
(switched to for-loops)
(Zig sorted alphabetically before zkn)
Line 4,136:
pop bc
ret ; return to BASIC interpreter</syntaxhighlight>
 
=={{header|Zig}}==
<syntaxhighlight lang="zig">
const std = @import("std");
 
pub fn main() !void {
const stdout_wr = std.io.getStdOut().writer();
for (1..6) |n| {
for (0..n) |_| {
try stdout_wr.writeAll("*");
}
try stdout_wr.writeAll("\n");
}
}
</syntaxhighlight>
{{out}}
<pre>
*
**
***
****
*****
</pre>
 
=={{header|zkl}}==
22

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.