diff --git a/a2/program.c b/a2/program.c index 3a8dd13..d15527f 100644 --- a/a2/program.c +++ b/a2/program.c @@ -20,7 +20,7 @@ int main(){ if (r[0] != '{' || r[0] != '(' || r[0] != '[' || r[0] != '<') { //i = n - 2; - //hej = 1; + hej = 1; //puts("halo"); } @@ -63,7 +63,7 @@ int main(){ hej = 4; printf("Read: %s", r); printf("Missing closing brackets: }\n"); - i++; + i = n - 1; } //hodnota = 0; } @@ -88,7 +88,7 @@ int main(){ hej = 4; printf("Read: %s", r); printf("Missing closing brackets: )\n"); - i++; + i = n - 1; } } } @@ -115,7 +115,7 @@ int main(){ hej = 4; printf("Read: %s", r); printf("Missing closing brackets: ]\n"); - i++; + i = n - 1; } } } @@ -139,7 +139,7 @@ int main(){ hej = 4; printf("Read: %s", r); printf("Missing closing brackets: >\n"); - i++; + i = n - 1; } } @@ -167,7 +167,7 @@ int main(){ puts("All brackets OK"); } if (hej == 0){ - printf("Read: %s\nCrossed bracket OK\n", r); + printf("Read: %sCrossed bracket OK\n", r); //printf("%s\n", r); }