From c35da2220c5f9b8889aec784e62c7568c9544447 Mon Sep 17 00:00:00 2001 From: Marat Izmailov Date: Thu, 17 Oct 2024 17:47:22 +0000 Subject: [PATCH] Add cv4/main.c --- cv4/main.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cv4/main.c diff --git a/cv4/main.c b/cv4/main.c new file mode 100644 index 0000000..32e0c9b --- /dev/null +++ b/cv4/main.c @@ -0,0 +1,22 @@ +#include "a_train.h" +#include + + +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; +}