usaa24/cv4/main.c

23 lines
495 B
C
Raw Permalink Normal View History

2024-10-17 17:47:22 +00:00
#include "a_train.h"
#include <stdio.h>
int main() {
struct car* train = NULL;
2024-10-17 17:49:42 +00:00
train = add_car(train, "Prešov");
2024-10-17 17:47:22 +00:00
train = add_car(train, "Bratislava");
2024-10-17 17:49:42 +00:00
train = add_car(train, "Levoča");
train = add_car(train, "Spišská Nová Ves");
2024-10-17 17:47:22 +00:00
2024-10-17 17:49:42 +00:00
printf("Zostava vlaku:\n");
2024-10-17 17:47:22 +00:00
print_train(train);
2024-10-17 17:49:42 +00:00
printf("\nOdstraňujeme vozne s cieľovou stanicou 'Levoča':\n");
train = clear_train(train, "Levoča");
2024-10-17 17:47:22 +00:00
print_train(train);
cancel_train(train);
return 0;
}