mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 15:59:59 +00:00
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.
This commit is contained in:
@@ -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});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user