35 lines
755 B
C
35 lines
755 B
C
#include <stdio.h>
|
|
#include "a_station.h"
|
|
|
|
int main() {
|
|
|
|
struct station* s = create_station();
|
|
|
|
|
|
add_target_capacity(s, "Kosice", 120);
|
|
add_target_capacity(s, "Presov", 60);
|
|
add_target_capacity(s, "Kosice", 30);
|
|
add_target_capacity(s, "Bratislava", 200);
|
|
add_target_capacity(s, "Zilina", 90);
|
|
|
|
|
|
print_station(s);
|
|
|
|
|
|
struct car* found = find_target(s, "Presov");
|
|
if (found) {
|
|
printf("Nájdená stanica: %s, kapacita: %d\n", found->value, found->capacity);
|
|
} else {
|
|
printf("Stanica 'Presov' sa nenašla.\n");
|
|
}
|
|
|
|
|
|
printf("Počet staníc: %d\n", get_total_targets(s));
|
|
printf("Celkova kapacita: %d\n", get_total_capacity(s));
|
|
|
|
|
|
destroy_station(s);
|
|
|
|
return 0;
|
|
}
|