Apply zig fmt to exercises
This commit is contained in:
parent
e58f155bd6
commit
2f821bd5e8
37 changed files with 152 additions and 144 deletions
|
|
@ -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", .{});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue