From a8d85d812d0e5e30aca1e2a36c309bd541f19da6 Mon Sep 17 00:00:00 2001 From: Deinerovych Date: Tue, 29 Oct 2024 15:07:18 +0100 Subject: [PATCH] 6 --- a1/program.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/a1/program.c b/a1/program.c index 22d64da..7147ee0 100644 --- a/a1/program.c +++ b/a1/program.c @@ -46,8 +46,7 @@ void check_brackets(const char *code) { } if (top != -1) { - printf("Unmatched opening bracket %c at position %d, expected %c\n", - stack[top], positions[top], + printf("Missing closing brackets: %c\n", stack[top] == '(' ? ')' : stack[top] == '{' ? '}' : stack[top] == '[' ? ']' : '>');