Apply zig fmt to exercises

This commit is contained in:
Will Clardy 2021-02-15 16:55:44 -05:00
parent e58f155bd6
commit 2f821bd5e8
37 changed files with 152 additions and 144 deletions

View file

@ -9,7 +9,6 @@ pub fn main() void {
for (animals) |a| printAnimal(a);
std.debug.print("done.\n", .{});
}
@ -21,9 +20,18 @@ fn printAnimal(animal: u8) void {
std.debug.print(") ", .{}); // <---- how!?
if (animal == 'g'){ std.debug.print("Goat", .{}); return; }
if (animal == 'c'){ std.debug.print("Cat", .{}); return; }
if (animal == 'd'){ std.debug.print("Dog", .{}); return; }
if (animal == 'g') {
std.debug.print("Goat", .{});
return;
}
if (animal == 'c') {
std.debug.print("Cat", .{});
return;
}
if (animal == 'd') {
std.debug.print("Dog", .{});
return;
}
std.debug.print("Unknown", .{});
}