This commit is contained in:
mr314ot 2025-10-19 08:25:24 +02:00
parent 35c6b17c1b
commit 20b5beae06

View File

@ -68,7 +68,11 @@ int main(){
} }
} }
if (top >= 0){ if (top >= 0){
printf("Unclosed bracket %c in %d\n", stack[top], len); printf("Missing closing brackets: ");
while (top >= 0) {
printf("%c", expectedClosing(stack[top--]));
}
printf("\n");
} else { } else {
printf("All brackets OK\n"); printf("All brackets OK\n");
} }