From e1b097d09bae9ab083164a484fd1e3700b047f93 Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Mon, 28 Oct 2024 17:02:09 +0000 Subject: [PATCH] Update cv6/main.c --- cv6/main.c | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/cv6/main.c b/cv6/main.c index e69de29..a909625 100644 --- a/cv6/main.c +++ b/cv6/main.c @@ -0,0 +1,41 @@ +#include "a_station.h" +#include +#include +#include + +void print_station(struct station* station){ + // Vypise celu stanicu + printf("station>>>\n"); + // Prechadza vsetky trate + for (int i = 0 ; i< station->track_count; i++){ + struct car* start = station->tracks[i]; + struct car* this = start; + // Prechadza vsetky vozne + while(this != NULL){ + printf("%s %d -> ",this->value,this->capacity); + this=this->next; + } + printf("NULL\n"); + } + printf("<<