refresh
This commit is contained in:
parent
20d7ab9f7d
commit
b357fe0711
@ -2,20 +2,16 @@
|
|||||||
#include "a_station.h"
|
#include "a_station.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
struct station* s = create_station();
|
struct station* s = create_station();
|
||||||
|
|
||||||
|
|
||||||
add_target_capacity(s, "Kosice", 120);
|
add_target_capacity(s, "Kosice", 120);
|
||||||
add_target_capacity(s, "Presov", 60);
|
add_target_capacity(s, "Presov", 60);
|
||||||
add_target_capacity(s, "Kosice", 30);
|
add_target_capacity(s, "Kosice", 30);
|
||||||
add_target_capacity(s, "Bratislava", 200);
|
add_target_capacity(s, "Bratislava", 200);
|
||||||
add_target_capacity(s, "Zilina", 90);
|
add_target_capacity(s, "Zilina", 90);
|
||||||
|
|
||||||
|
|
||||||
print_station(s);
|
print_station(s);
|
||||||
|
|
||||||
|
|
||||||
struct car* found = find_target(s, "Presov");
|
struct car* found = find_target(s, "Presov");
|
||||||
if (found) {
|
if (found) {
|
||||||
printf("Nájdená stanica: %s, kapacita: %d\n", found->value, found->capacity);
|
printf("Nájdená stanica: %s, kapacita: %d\n", found->value, found->capacity);
|
||||||
@ -23,12 +19,9 @@ int main() {
|
|||||||
printf("Stanica 'Presov' sa nenašla.\n");
|
printf("Stanica 'Presov' sa nenašla.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
printf("Počet staníc: %d\n", get_total_targets(s));
|
printf("Počet staníc: %d\n", get_total_targets(s));
|
||||||
printf("Celkova kapacita: %d\n", get_total_capacity(s));
|
printf("Celkova kapacita: %d\n", get_total_capacity(s));
|
||||||
|
|
||||||
|
|
||||||
destroy_station(s);
|
destroy_station(s);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user