From adf5ddb27df7f5a22b0b7d3321dfc8bca1e7937a Mon Sep 17 00:00:00 2001 From: Dave Gauer Date: Sun, 7 Feb 2021 11:06:51 -0500 Subject: Consistent instructions and examples I started off with "hints" that required the poor student to piece together the information from incomplete bits. A complete example is like a picture that is worth 1000 words and far clearer. --- 12_while2.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '12_while2.zig') diff --git a/12_while2.zig b/12_while2.zig index dba1a26..6f808c8 100644 --- a/12_while2.zig +++ b/12_while2.zig @@ -23,11 +23,13 @@ const std = @import("std"); pub fn main() void { var n: u32 = 2; + // Please set the continue expression so that we get the desired + // results in the print statement below. while (n < 1000) : ??? { // Print the current number std.debug.print("{} ", .{n}); } - // Make this print n=1024 + // As in the last exercise, we want this to result in "n=1024" std.debug.print("n={}\n", .{n}); } -- cgit v1.2.3-ZIG