This commit is contained in:
Damián Korpesio 2021-11-28 18:57:30 +01:00
parent fa52b8999f
commit cc999bf4ca

View File

@ -20,7 +20,7 @@ int main(){
if (r[0] != '{' || r[0] != '(' || r[0] != '[' || r[0] != '<') { if (r[0] != '{' || r[0] != '(' || r[0] != '[' || r[0] != '<') {
//i = n - 2; //i = n - 2;
hej = 1; //hej = 1;
//puts("halo"); //puts("halo");
} }
@ -59,7 +59,13 @@ int main(){
a = n; a = n;
i = n - 1; i = n - 1;
} }
//hodnota = 0; else if (a == n - 1 && hej == 0){
hej = 4;
printf("Read: %s", r);
printf("Missing closing brackets: }\n");
i++;
}
//hodnota = 0;
} }
} }
else if (hodnota == 2){ else if (hodnota == 2){
@ -78,6 +84,12 @@ int main(){
a = n; a = n;
i = n - 1; i = n - 1;
} }
else if (a == n - 1 && hej == 0){
hej = 4;
printf("Read: %s", r);
printf("Missing closing brackets: )\n");
i++;
}
} }
} }
else if (hodnota == 3) { else if (hodnota == 3) {
@ -99,6 +111,12 @@ int main(){
i = n - 1; i = n - 1;
} }
else if (a == n - 1 && hej == 0){
hej = 4;
printf("Read: %s", r);
printf("Missing closing brackets: ]\n");
i++;
}
} }
} }
else if (hodnota == 4){ else if (hodnota == 4){
@ -117,6 +135,12 @@ int main(){
a = n; a = n;
i = n - 1; i = n - 1;
} }
else if (a == n - 1 && hej == 0){
hej = 4;
printf("Read: %s", r);
printf("Missing closing brackets: >\n");
i++;
}
} }
} }