From ce643ee74284e338d98cb09c422352510db90a72 Mon Sep 17 00:00:00 2001 From: Marat Izmailov Date: Thu, 31 Oct 2024 20:54:31 +0000 Subject: [PATCH] Update a1/program.c --- a1/program.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/a1/program.c b/a1/program.c index 595f9d4..9560e73 100644 --- a/a1/program.c +++ b/a1/program.c @@ -69,7 +69,11 @@ int main() { // If there are unmatched opening brackets left in the stack if (top != -1) { - printf("Missing closing brackets: %c\n", getExpectedClosingBracket(stack[top])); + printf("Missing closing brackets: "); + for (int i = top; i >= 0; i--) { + printf("%c", getExpectedClosingBracket(stack[i])); + } + printf("\n"); return 0; }