mirror of
https://codeberg.org/ziglings/exercises.git
synced 2024-12-27 01:46:29 +00:00
added newline print to make output look nicer
This commit is contained in:
parent
aa733dc3ef
commit
e051903055
2 changed files with 4 additions and 11 deletions
14
build.zig
14
build.zig
|
@ -280,7 +280,7 @@ const exercises = [_]Exercise{
|
||||||
},
|
},
|
||||||
.{
|
.{
|
||||||
.main_file = "052_slices.zig",
|
.main_file = "052_slices.zig",
|
||||||
.output = "Hand1: A 4 K 8 Hand2: 5 2 Q J",
|
.output = "Hand1: A 4 K 8 \nHand2: 5 2 Q J",
|
||||||
},
|
},
|
||||||
.{
|
.{
|
||||||
.main_file = "053_slices2.zig",
|
.main_file = "053_slices2.zig",
|
||||||
|
@ -302,11 +302,7 @@ const exercises = [_]Exercise{
|
||||||
.main_file = "057_unions3.zig",
|
.main_file = "057_unions3.zig",
|
||||||
.output = "Insect report! Ant alive is: true. Bee visited 17 flowers.",
|
.output = "Insect report! Ant alive is: true. Bee visited 17 flowers.",
|
||||||
},
|
},
|
||||||
.{
|
.{ .main_file = "058_quiz7.zig", .output = "Archer's Point--2->Bridge--1->Dogwood Grove--3->Cottage--2->East Pond--1->Fox Pond", .hint = "This is the biggest program we've seen yet. But you can do it!" },
|
||||||
.main_file = "058_quiz7.zig",
|
|
||||||
.output = "Archer's Point--2->Bridge--1->Dogwood Grove--3->Cottage--2->East Pond--1->Fox Pond",
|
|
||||||
.hint = "This is the biggest program we've seen yet. But you can do it!"
|
|
||||||
},
|
|
||||||
.{
|
.{
|
||||||
.main_file = "059_integers.zig",
|
.main_file = "059_integers.zig",
|
||||||
.output = "Zig is cool.",
|
.output = "Zig is cool.",
|
||||||
|
@ -336,11 +332,7 @@ const exercises = [_]Exercise{
|
||||||
.main_file = "065_builtins2.zig",
|
.main_file = "065_builtins2.zig",
|
||||||
.output = "A Narcissus loves all Narcissuses. He has room in his heart for: me myself.",
|
.output = "A Narcissus loves all Narcissuses. He has room in his heart for: me myself.",
|
||||||
},
|
},
|
||||||
.{
|
.{ .main_file = "066_comptime.zig", .output = "Immutable: 12345, 987.654; Mutable: 54321, 456.789; Types: comptime_int, comptime_float, u32, f32", .hint = "It may help to read this one out loud to your favorite stuffed animal until it sinks in completely." },
|
||||||
.main_file = "066_comptime.zig",
|
|
||||||
.output = "Immutable: 12345, 987.654; Mutable: 54321, 456.789; Types: comptime_int, comptime_float, u32, f32",
|
|
||||||
.hint = "It may help to read this one out loud to your favorite stuffed animal until it sinks in completely."
|
|
||||||
},
|
|
||||||
.{
|
.{
|
||||||
.main_file = "067_comptime2.zig",
|
.main_file = "067_comptime2.zig",
|
||||||
.output = "A BB CCC DDDD",
|
.output = "A BB CCC DDDD",
|
||||||
|
|
|
@ -47,6 +47,7 @@ fn printHand(hand: ???) void {
|
||||||
for (hand) |h| {
|
for (hand) |h| {
|
||||||
std.debug.print("{u} ", .{h});
|
std.debug.print("{u} ", .{h});
|
||||||
}
|
}
|
||||||
|
std.debug.print("\n", .{});
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Fun fact: Under the hood, slices are stored as a pointer to
|
// Fun fact: Under the hood, slices are stored as a pointer to
|
||||||
|
|
Loading…
Reference in a new issue