Add cv4/main.c
This commit is contained in:
parent
a1ac221b21
commit
c35da2220c
22
cv4/main.c
Normal file
22
cv4/main.c
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include "a_train.h"
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
struct car* train = NULL;
|
||||||
|
train = add_car(train, "Presov");
|
||||||
|
train = add_car(train, "Bratislava");
|
||||||
|
train = add_car(train, "Levoca");
|
||||||
|
train = add_car(train, "Spiska Nova Ves");
|
||||||
|
|
||||||
|
printf("Состав поезда:\n");
|
||||||
|
print_train(train);
|
||||||
|
|
||||||
|
printf("\nУдаляем вагоны с целевой станцией 'Levoca':\n");
|
||||||
|
train = clear_train(train, "Levoca");
|
||||||
|
print_train(train);
|
||||||
|
|
||||||
|
cancel_train(train);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user