Aktualizovat a1/program.c
This commit is contained in:
parent
cded8273ba
commit
feda71d2da
10
a1/program.c
10
a1/program.c
@ -53,10 +53,14 @@ int main() {
|
||||
}
|
||||
}
|
||||
|
||||
if (verh !=-1) {
|
||||
printf("Missing closing brackets: %c\n", matching(stack[verh]));
|
||||
return 0;
|
||||
if (verh != -1) {
|
||||
printf("Missing closing brackets: ");
|
||||
for (int j = verh; j >= 0; j--) {
|
||||
printf("%c", matching(stack[j]));
|
||||
}
|
||||
printf("\n");
|
||||
return 0;
|
||||
}
|
||||
printf("All brackets OK\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user