Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334//// Now we get into the fun stuff, starting with the 'if' statement!//// if (true) {// ...// } else {// ...// }//// Zig has the "usual" comparison operators such as://// a == b means "a equals b"// a < b means "a is less than b"// a > b means "a is greater than b"// a != b means "a does not equal b"//// The important thing about Zig's "if" is that it *only* accepts// boolean values. It won't coerce numbers or other types of data// to true and false.//const std = @import("std");
pub fn main() void { const foo = 42;
// Please fix this condition: if (foo == 42) { // We want our program to print this message! std.debug.print("Foo is 42!\n", .{}); } else { std.debug.print("Foo is not 42!\n", .{}); }}