From 0f046689c043950541519d80a3e5353865331feb Mon Sep 17 00:00:00 2001 From: 2wenty1ne <3013050@stud.hs-mannheim.de> Date: Thu, 24 Oct 2024 15:02:23 +0200 Subject: [PATCH] Added testees string array --- Testat-Planer.zig | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Testat-Planer.zig b/Testat-Planer.zig index ec7af60..ab3d396 100644 --- a/Testat-Planer.zig +++ b/Testat-Planer.zig @@ -5,18 +5,28 @@ const Timestamp = struct { minutes: u64, }; -const testees = undefined; -const number_of_testees: u64 = undefined; // len von testees +const testees:[]const []const u8 = &[_][] const u8 { + "Nastja", + "Vikkes", + "Group 3", +}; +const number_of_testees: u64 = testees.len; // len von testees const total_minutes: u64 = 60; // Gesamte Dauer in min const pause_minutes: u64 = 2; // Länge der Pause zwischen 2 Testaten pub fn main () !void { + const writer = std.io.getStdOut().writer(); var testStamp = Timestamp { .hours = 13, .minutes = 5, }; + try writer.print("Amount tests: {d} \n", .{number_of_testees}); + for (testees) |row| { + try writer.print("Name: {s} \n", .{row}); + } + try printTimestamp(&testStamp); }