exercises/patches/patches/076_sentinels.patch
2024-09-02 19:33:59 +02:00

20 lines
684 B
Diff

--- exercises/076_sentinels.zig 2024-09-02 19:27:04.336781039 +0200
+++ answers/076_sentinels.zig 2024-09-02 19:26:15.709134934 +0200
@@ -82,7 +82,7 @@
print("Array:", .{});
// Loop through the items in my_seq.
- for (???) |s| {
+ for (my_seq) |s| {
print("{}", .{s});
}
},
@@ -94,7 +94,7 @@
// Loop through the items in my_seq until we hit the
// sentinel value.
var i: usize = 0;
- while (??? != my_sentinel) {
+ while (my_seq[i] != my_sentinel) {
print("{}", .{my_seq[i]});
i += 1;
}