This commit is contained in:
Bohdan Kapliuk 2024-10-28 00:23:28 +02:00
parent 8a6899d70f
commit 04b696bd56

View File

@ -44,7 +44,7 @@ int main() {
}
if (x > 0) {
printf("Missing closing brackets: ");
for (int i = x; i >= 0; i--) {
for (int i = x-1; i >= 0; i--) {
if (stack[i] == '{') printf("}");
else if (stack[i] == '[') printf("]");
else if (stack[i] == '(') printf(")");