Apply zig fmt to exercises

This commit is contained in:
Will Clardy
2021-02-15 16:55:44 -05:00
parent 97ae27435b
commit 238beb4a2d
37 changed files with 152 additions and 144 deletions

View File

@@ -16,7 +16,7 @@
//
// WE know there are only three operations but Zig doesn't. Use the
// unreachable statement to make the switch complete. Or ELSE. :-)
//
//
const std = @import("std");
pub fn main() void {
@@ -26,9 +26,15 @@ pub fn main() void {
for (operations) |op| {
switch (op) {
1 => { current_value += 1; },
2 => { current_value -= 1; },
3 => { current_value *= current_value; },
1 => {
current_value += 1;
},
2 => {
current_value -= 1;
},
3 => {
current_value *= current_value;
},
}
std.debug.print("{} ", .{current_value});