From f0059b60912aa2f7c9ce514317ce43e8e4408aba Mon Sep 17 00:00:00 2001 From: Weber Date: Thu, 31 Oct 2024 18:02:54 +0000 Subject: [PATCH] test --- a1/program.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/a1/program.c b/a1/program.c index 395131c..5cbf877 100644 --- a/a1/program.c +++ b/a1/program.c @@ -92,11 +92,15 @@ void skontrolujZatvorky(const char *kod) { } if (!jePrazdny(&z)) { - char nezodpovedajuca = vyber(&z); - printf("Missing closing brackets: %c\n", - (nezodpovedajuca == '{') ? '}' : - (nezodpovedajuca == '[') ? ']' : - (nezodpovedajuca == '<') ? '>' : ')'); + printf("Missing closing brackets: "); + while (!jePrazdny(&z)) { + char nezodpovedajuca = vyber(&z); + printf("%c ", + (nezodpovedajuca == '{') ? '}' : + (nezodpovedajuca == '[') ? ']' : + (nezodpovedajuca == '<') ? '>' : ')'); + } + printf("\n"); return; }