This commit is contained in:
Džubara 2024-10-31 23:42:43 +01:00
parent 3c23edb5f4
commit e2ae3d2773

View File

@ -10,7 +10,7 @@ void check_brackets(const char *code) {
char stack[100];
int top = -1;
printf("Read: %s", code);
printf("Read: %s", code); // Výstup pre načítanie vstupu
for (int i = 0; code[i] != '\0'; i++) {
char c = code[i];
@ -37,7 +37,8 @@ void check_brackets(const char *code) {
int main() {
char code[100];
fgets(code, 100, stdin);
check_brackets(code);
if (fgets(code, sizeof(code), stdin) != NULL) {
check_brackets(code);
}
return 0;
}