diff --git a/a1/program.c b/a1/program.c index 9ccb624..0303ea0 100644 --- a/a1/program.c +++ b/a1/program.c @@ -111,18 +111,21 @@ int main() i++; } - if(count_stack(&mystack)>0) + if(is_ok) { - printf("\nMissing closing brackets: "); - do - { + if(count_stack(&mystack)>0) + { + printf("\nMissing closing brackets: "); + do + { cs=pop_stack(&mystack); printf("%c", para(cs)); - }while(count_stack(&mystack)>0); - printf("\n"); - } - else if(is_ok) + }while(count_stack(&mystack)>0); + printf("\n"); + } + else printf("\nAll brackets OK\n"); + }