a1
This commit is contained in:
parent
ae36a3dfe9
commit
f44455c266
@ -43,6 +43,10 @@ int main() {
|
||||
}
|
||||
}
|
||||
if (x > 0) {
|
||||
if (stack[x-1] == '{') expected = '}';
|
||||
else if (stack[x-1] == '[') expected = ']';
|
||||
else if (stack[x-1] == '(') expected = ')';
|
||||
else if (stack[x-1] == '<') expected = '>';
|
||||
printf("Missing closing brackets: %c\n", expected);
|
||||
} else {
|
||||
printf("All brackets OK\n");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user