a1 - 6
This commit is contained in:
parent
35c6b17c1b
commit
20b5beae06
@ -68,7 +68,11 @@ int main(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (top >= 0){
|
if (top >= 0){
|
||||||
printf("Unclosed bracket %c in %d\n", stack[top], len);
|
printf("Missing closing brackets: ");
|
||||||
|
while (top >= 0) {
|
||||||
|
printf("%c", expectedClosing(stack[top--]));
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
} else {
|
} else {
|
||||||
printf("All brackets OK\n");
|
printf("All brackets OK\n");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user