This commit is contained in:
Bohdan Kapliuk 2024-10-27 22:45:45 +02:00
parent 8e17d44983
commit b96ad19785

View File

@ -20,7 +20,7 @@ int main() {
x++; x++;
break; break;
} else if (vstup[j] == brackets1[i]) { } else if (vstup[j] == brackets1[i]) {
char expected; char expected = '\0';
if (stack[x-1] == '{') expected = '}'; if (stack[x-1] == '{') expected = '}';
else if (stack[x-1] == '[') expected = ']'; else if (stack[x-1] == '[') expected = ']';
else if (stack[x-1] == '(') expected = ')'; else if (stack[x-1] == '(') expected = ')';