From d4ed21490efb60f8349a3844566e02ddfa241a68 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Sat, 18 May 2024 21:28:59 -0400 Subject: [PATCH] 059-061 completed --- exercises/059_integers.zig | 6 +++--- exercises/060_floats.zig | 2 +- exercises/061_coercions.zig | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/059_integers.zig b/exercises/059_integers.zig index ae65790..32953e5 100644 --- a/exercises/059_integers.zig +++ b/exercises/059_integers.zig @@ -20,9 +20,9 @@ const print = @import("std").debug.print; pub fn main() void { const zig = [_]u8{ - 0o131, // octal - 0b1101000, // binary - 0x66, // hex + 0o132, // octal + 0b1101001, // binary + 0x67, // hex }; print("{s} is cool.\n", .{zig}); diff --git a/exercises/060_floats.zig b/exercises/060_floats.zig index 6f341ad..19c0d8a 100644 --- a/exercises/060_floats.zig +++ b/exercises/060_floats.zig @@ -43,7 +43,7 @@ pub fn main() void { // // We'll convert this weight from pound to kilograms at a // conversion of 0.453592kg to the pound. - const shuttle_weight: f16 = 0.453592 * 4480e6; + const shuttle_weight: f32 = 0.453592 * 4480e+3; // By default, float values are formatted in scientific // notation. Try experimenting with '{d}' and '{d:.3}' to see diff --git a/exercises/061_coercions.zig b/exercises/061_coercions.zig index ccf3c9b..0ecf542 100644 --- a/exercises/061_coercions.zig +++ b/exercises/061_coercions.zig @@ -67,7 +67,7 @@ const print = @import("std").debug.print; pub fn main() void { var letter: u8 = 'A'; - const my_letter: ??? = &letter; + const my_letter: ?*[1]u8 = &letter; // ^^^^^^^ // Your type here. // Must coerce from &letter (which is a *u8).