From e0abece4a2cafa7985e28524cdeb3b48e844438a Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Wed, 23 Oct 2024 19:47:05 +0000 Subject: [PATCH] Update cv4/a_train.c --- cv4/a_train.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cv4/a_train.c b/cv4/a_train.c index 5590ad3..5005810 100644 --- a/cv4/a_train.c +++ b/cv4/a_train.c @@ -34,9 +34,12 @@ void print_train(struct car* first) do { - printf("%s -> ", first->value); + printf("%s", first->value); first=first->next; - }while(first->next!=NULL); + if(first){ + printf("->"); + } + }while(first!=NULL); }