From cb21f01ac7ff3a6077804efd792dfa41a5619208 Mon Sep 17 00:00:00 2001 From: Maryna Kravtsova Date: Mon, 2 Nov 2020 11:37:31 +0100 Subject: [PATCH] print --- cv5/a_train.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cv5/a_train.c b/cv5/a_train.c index e9c0062..d98daa3 100644 --- a/cv5/a_train.c +++ b/cv5/a_train.c @@ -20,11 +20,12 @@ struct car* add_car(struct car* first,const char* target) { void print_train(struct car* first) { struct car* this = first; - if(first == NULL){ + /*if(first == NULL){ exit(0); - } - else{ - while(this != NULL){ + }*/ + //else{ + if(first != NULL){ + while(this != NULL){ printf("%s\n", this->value); this = this->next; }