From 0d7e32d2b7b2a2e4df2e9c37a57ccf04c9213dae Mon Sep 17 00:00:00 2001 From: Radovan Kofira Date: Thu, 5 Nov 2020 20:41:10 +0100 Subject: [PATCH] 57% --- cv5/a_train.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index f988f6a..da090e8 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -27,11 +27,13 @@ struct car* add_car(struct car* first,const char* target) { } void print_train(struct car* first) { -struct car* this=first; - /* while(this->next!=NULL){ +if(first!=NULL){ + struct car* this=first; + while(this->next!=NULL){ printf("%s",this->value); this=this->next; - }*/ + } + } } void cancel_train(struct car* first) {