From f0493d90a883a96fe665e360bace6b0a0103c2ae Mon Sep 17 00:00:00 2001 From: Viktor Daniv Date: Sat, 26 Oct 2024 19:52:11 +0000 Subject: [PATCH] Update a1/program.c --- a1/program.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/a1/program.c b/a1/program.c index 7ecb597..e335db9 100644 --- a/a1/program.c +++ b/a1/program.c @@ -27,7 +27,7 @@ void check_brackets(const char *code) { // Якщо відкрита дужка, додаємо її до стеку if (c == '(' || c == '{' || c == '[' || c == '<') { if (stack_top >= MAX - 1) { - printf("Stack overflow at position %d\n", i); + printf("Stack overflow in %d\n", i); return; } stack[++stack_top] = c; @@ -41,7 +41,7 @@ void check_brackets(const char *code) { char top = stack[stack_top--]; char expected = expected_close(top); if (expected != c) { - printf("Crossed bracket %c at position %d, expected %c\n", c, i, expected); + printf("Crossed bracket %c in %d, expected %c\n", c, i, expected); return; } }