Обновить cv6/main.c

This commit is contained in:
Yevhen Kozirovskyi 2024-11-08 00:18:15 +00:00
parent 8ff72ee527
commit fb848bf8d2

View File

@ -0,0 +1,21 @@
#include <stdio.h>
#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;
}