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; }