Update a1/program.c

This commit is contained in:
Marat Izmailov 2024-10-31 20:54:31 +00:00
parent 377897bc64
commit ce643ee742

View File

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