diff options
author | Dave Gauer <dave@ratfactor.com> | 2021-02-28 13:51:33 -0500 |
---|---|---|
committer | Dave Gauer <dave@ratfactor.com> | 2021-02-28 13:51:33 -0500 |
commit | 2d205d9645b6c7947e3016fca98dfaf533d3f5e2 (patch) | |
tree | c9523b67ec4b53470c1746d023e34c2bc6fc409a /exercises/48_methods2.zig | |
parent | b12afaa577e5f9b0c3bf922ec5c1ab15893c7378 (diff) | |
download | ziglings-2d205d9645b6c7947e3016fca98dfaf533d3f5e2.tar.gz ziglings-2d205d9645b6c7947e3016fca98dfaf533d3f5e2.tar.bz2 ziglings-2d205d9645b6c7947e3016fca98dfaf533d3f5e2.tar.xz ziglings-2d205d9645b6c7947e3016fca98dfaf533d3f5e2.zip |
Added quiz 6 (and the trumpeting sounds grow louder)
Diffstat (limited to 'exercises/48_methods2.zig')
-rw-r--r-- | exercises/48_methods2.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/exercises/48_methods2.zig b/exercises/48_methods2.zig index b9477da..37b182c 100644 --- a/exercises/48_methods2.zig +++ b/exercises/48_methods2.zig @@ -23,9 +23,9 @@ const Elephant = struct { } pub fn print(self: *Elephant) void { - // Prints elephant letter and (V)isited or (U)nvisited. - var v: u8 = if (self.visited) 'V' else 'U'; - std.debug.print("Elephant {u} ({u}). ", .{ self.letter, v}); + // Prints elephant letter and [v]isited + var v: u8 = if (self.visited) 'v' else ' '; + std.debug.print("{u}{u} ", .{ self.letter, v }); } }; |