summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.zig4
-rw-r--r--exercises/009_if.zig6
-rw-r--r--patches/patches/009_if.patch10
3 files changed, 10 insertions, 10 deletions
diff --git a/build.zig b/build.zig
index bc0b23e..750732c 100644
--- a/build.zig
+++ b/build.zig
@@ -730,7 +730,7 @@ const exercises = [_]Exercise{
},
.{
.main_file = "009_if.zig",
- .output = "Foo is 1!",
+ .output = "Foo is 42!",
},
.{
.main_file = "010_if2.zig",
@@ -1275,7 +1275,7 @@ const exercises = [_]Exercise{
\\Max difference (new fn): 0.014
,
},
- .{ .main_file = "110_quiz9.zig", .output =
+ .{ .main_file = "110_quiz9.zig", .output =
\\Toggle pins with XOR on PORTB
\\-----------------------------
\\ 1100 // (initial state of PORTB)
diff --git a/exercises/009_if.zig b/exercises/009_if.zig
index 4536fc3..e167104 100644
--- a/exercises/009_if.zig
+++ b/exercises/009_if.zig
@@ -21,13 +21,13 @@
const std = @import("std");
pub fn main() void {
- const foo = 1;
+ const foo = 42;
// Please fix this condition:
if (foo) {
// We want our program to print this message!
- std.debug.print("Foo is 1!\n", .{});
+ std.debug.print("Foo is 42!\n", .{});
} else {
- std.debug.print("Foo is not 1!\n", .{});
+ std.debug.print("Foo is not 42!\n", .{});
}
}
diff --git a/patches/patches/009_if.patch b/patches/patches/009_if.patch
index ebebb35..4692f1a 100644
--- a/patches/patches/009_if.patch
+++ b/patches/patches/009_if.patch
@@ -1,11 +1,11 @@
---- exercises/009_if.zig 2023-10-03 22:15:22.122241138 +0200
-+++ answers/009_if.zig 2023-10-05 20:04:06.882763636 +0200
+--- exercises/009_if.zig 2025-11-28 14:40:19.301738185 +0100
++++ answers/009_if.zig 2025-11-28 14:39:07.756077340 +0100
@@ -24,7 +24,7 @@
- const foo = 1;
+ const foo = 42;
// Please fix this condition:
- if (foo) {
-+ if (foo == 1) {
++ if (foo == 42) {
// We want our program to print this message!
- std.debug.print("Foo is 1!\n", .{});
+ std.debug.print("Foo is 42!\n", .{});
} else {