summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorChris Boesch <chrboesch@noreply.codeberg.org>2026-02-27 19:44:35 +0100
committerChris Boesch <chrboesch@noreply.codeberg.org>2026-02-27 19:44:35 +0100
commitd5fdfe708c4ae22c4822a046c54d01f298ae0b11 (patch)
tree26b711143cd31e89d3a2489d2ac6ab562e899eea /patches
parent07031c5daac4291e4d23599a944b84e6b434f9c2 (diff)
parent88510735e13f8c5cd7bbb2d08ba1cbfd407dca04 (diff)
Merge pull request 'emphasize that the end number of a for-loop range is exclusive' (#366) from pebose/exercises:emphasize-for-loop-range into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/366
Diffstat (limited to 'patches')
-rw-r--r--patches/patches/095_for3.patch15
1 files changed, 12 insertions, 3 deletions
diff --git a/patches/patches/095_for3.patch b/patches/patches/095_for3.patch
index ca9e3ad..a158b31 100644
--- a/patches/patches/095_for3.patch
+++ b/patches/patches/095_for3.patch
@@ -1,6 +1,6 @@
---- exercises/095_for3.zig 2023-10-03 22:15:22.125574535 +0200
-+++ answers/095_for3.zig 2023-10-05 20:04:07.272770937 +0200
-@@ -54,7 +54,7 @@
+--- exercises/095_for3.zig 2026-02-27 19:33:59
++++ answers/095_for3.zig 2026-02-27 19:33:38
+@@ -56,7 +56,7 @@
// I want to print every number between 1 and 20 that is NOT
// divisible by 3 or 5.
@@ -9,3 +9,12 @@
// The '%' symbol is the "modulo" operator and it
// returns the remainder after division.
+@@ -68,7 +68,7 @@
+ std.debug.print("\n", .{});
+
+ // Let's also print every number from 1 through 15
+- for (???) |n| {
++ for (1..16) |n| {
+ std.debug.print("{} ", .{n});
+ }
+ std.debug.print("\n", .{});