diff options
author | Dave Gauer <dave@ratfactor.com> | 2021-02-09 18:36:57 -0500 |
---|---|---|
committer | Dave Gauer <dave@ratfactor.com> | 2021-02-09 18:36:57 -0500 |
commit | 55ad7c32f2d534b1fbd438204d21738f958c51a5 (patch) | |
tree | 16be4b53193105a759b3eec25be5e664d41c428d /09_if.zig | |
parent | cf0920de31e9b5f3c5ba6de19a1b4c8d0c58b907 (diff) | |
download | ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.tar.gz ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.tar.bz2 ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.tar.xz ziglings-55ad7c32f2d534b1fbd438204d21738f958c51a5.zip |
Moved exercises to exercises because exercises
Diffstat (limited to '09_if.zig')
-rw-r--r-- | 09_if.zig | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/09_if.zig b/09_if.zig deleted file mode 100644 index 28ac712..0000000 --- a/09_if.zig +++ /dev/null @@ -1,32 +0,0 @@ -// -// 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 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 = 1; - - // Please fix this condition: - if (foo) { - // We want out program to print this message! - std.debug.print("Foo is 1!\n", .{}); - } else { - std.debug.print("Foo is not 1!\n", .{}); - } -} |