From fb848bf8d23cdad8c25af5b3333587b1d4a5e230 Mon Sep 17 00:00:00 2001 From: Yevhen Kozirovskyi Date: Fri, 8 Nov 2024 00:18:15 +0000 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20cv6/main.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cv6/main.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/cv6/main.c b/cv6/main.c index e69de29..a33f62a 100644 --- a/cv6/main.c +++ b/cv6/main.c @@ -0,0 +1,21 @@ +#include +#include "a_station.h" + +int main() { + struct station* my_station = create_station(); + if (my_station == NULL) { + printf("Chyba: Nepodarilo sa vytvoriť stanicu\n"); + return 1; + } + + add_target_capacity(my_station, "Bratislava", 100); + add_target_capacity(my_station, "Kosice", 150); + add_target_capacity(my_station, "Bratislava", 50); + + printf("Kapacita do stanice Bratislava: %d\n", get_target_capacity(my_station, "Bratislava")); + printf("Celkový počet cieľových staníc: %d\n", count_targets(my_station)); + printf("Celková kapacita na všetkých smeroch: %d\n", count_capacity(my_station)); + + destroy_station(my_station); + return 0; +} \ No newline at end of file