Update a1/program.c
This commit is contained in:
parent
377897bc64
commit
ce643ee742
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user