059-061 completed

This commit is contained in:
Andrew Scott 2024-05-18 21:28:59 -04:00
parent 7108f89eb3
commit d4ed21490e
Signed by: a
GPG key ID: 7CD5A5977E4931C1
3 changed files with 5 additions and 5 deletions

View file

@ -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});

View file

@ -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

View file

@ -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).