diff --git a/a1/program.c b/a1/program.c index e7daa56..5e87a6f 100644 --- a/a1/program.c +++ b/a1/program.c @@ -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");