From 7c8e8584b8b5ccc19354e00c41be0bdf8ae77459 Mon Sep 17 00:00:00 2001 From: Marat Izmailov Date: Thu, 7 Nov 2024 21:13:50 +0000 Subject: [PATCH] Add cv6/main.c --- cv6/main.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cv6/main.c diff --git a/cv6/main.c b/cv6/main.c new file mode 100644 index 0000000..c0cb40d --- /dev/null +++ b/cv6/main.c @@ -0,0 +1,40 @@ +#include "a_station.h" +#include +#include +#include + +// Печатает всю станцию для отладки +void print_station(struct station* station) { + printf("station>>>\n"); + for (int i = 0; i < station->track_count; i++) { + struct car* current = station->tracks[i]; + while (current) { + printf("%s %d -> ", current->value, current->capacity); + current = current->next; + } + printf("NULL\n"); + } + printf("<<