Update a1/program.c

This commit is contained in:
Yurii Chechur 2024-10-24 20:24:01 +00:00
parent be684056e7
commit 6e170886b3

View File

@ -39,7 +39,7 @@ int main() {
} else if (isClosing(current)) { } else if (isClosing(current)) {
if (top == -1) { if (top == -1) {
printf("Unexpected closing bracket '%c' in %d.\n", current, i); printf("Unexpected closing bracket '%c' in %d.\n", current, i);
return 1; return 0;
} }
if (!isMatching(stack[top], current)) { if (!isMatching(stack[top], current)) {
printf("Crossed bracket '%c' in %d , expected \n", current, i); printf("Crossed bracket '%c' in %d , expected \n", current, i);