usaa24/cv6/main.c

21 lines
707 B
C

#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;
}