my ziglings
0

Configure Feed

Select the types of activity you want to include in your feed.

changed 1 to 42 for better understanding

Chris Boesch (Nov 28, 2025, 2:42 PM +0100) 757826d4 ed9694e5

+10 -10
+2 -2
build.zig
··· 730 730 }, 731 731 .{ 732 732 .main_file = "009_if.zig", 733 - .output = "Foo is 1!", 733 + .output = "Foo is 42!", 734 734 }, 735 735 .{ 736 736 .main_file = "010_if2.zig", ··· 1275 1275 \\Max difference (new fn): 0.014 1276 1276 , 1277 1277 }, 1278 - .{ .main_file = "110_quiz9.zig", .output = 1278 + .{ .main_file = "110_quiz9.zig", .output = 1279 1279 \\Toggle pins with XOR on PORTB 1280 1280 \\----------------------------- 1281 1281 \\ 1100 // (initial state of PORTB)
+3 -3
exercises/009_if.zig
··· 21 21 const std = @import("std"); 22 22 23 23 pub fn main() void { 24 - const foo = 1; 24 + const foo = 42; 25 25 26 26 // Please fix this condition: 27 27 if (foo) { 28 28 // We want our program to print this message! 29 - std.debug.print("Foo is 1!\n", .{}); 29 + std.debug.print("Foo is 42!\n", .{}); 30 30 } else { 31 - std.debug.print("Foo is not 1!\n", .{}); 31 + std.debug.print("Foo is not 42!\n", .{}); 32 32 } 33 33 }
+5 -5
patches/patches/009_if.patch
··· 1 - --- exercises/009_if.zig 2023-10-03 22:15:22.122241138 +0200 2 - +++ answers/009_if.zig 2023-10-05 20:04:06.882763636 +0200 1 + --- exercises/009_if.zig 2025-11-28 14:40:19.301738185 +0100 2 + +++ answers/009_if.zig 2025-11-28 14:39:07.756077340 +0100 3 3 @@ -24,7 +24,7 @@ 4 - const foo = 1; 4 + const foo = 42; 5 5 6 6 // Please fix this condition: 7 7 - if (foo) { 8 - + if (foo == 1) { 8 + + if (foo == 42) { 9 9 // We want our program to print this message! 10 - std.debug.print("Foo is 1!\n", .{}); 10 + std.debug.print("Foo is 42!\n", .{}); 11 11 } else {