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

@@ -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", .{});
}