This commit is contained in:
Bohdan Kapliuk 2024-10-06 14:27:42 +03:00
parent a300c96563
commit 5d47005014

View File

@ -23,18 +23,18 @@ int main(){
char vstup1[LINESIZE]; char vstup1[LINESIZE];
char vstup2[LINESIZE]; char vstup2[LINESIZE];
while (count < LINESIZE) { while (count < LINESIZE) {
if (fgets(vstup, LINESIZE, stdin)) { if (fgets(vstup1, LINESIZE, stdin)) {
vstup1[strcspn(vstup, "\n")] = '\0'; vstup1[strcspn(vstup1, "\n")] = '\0';
if (strlen(vstup) == 0) { if (strlen(vstup1) == 0) {
break; break;
} }
} else { } else {
break; break;
} }
if (fgets(vstup, LINESIZE, stdin)) { if (fgets(vstup2, LINESIZE, stdin)) {
vstup2[strcspn(vstup, "\n")] = '\0'; vstup2[strcspn(vstup2, "\n")] = '\0';
if (strlen(vstup) == 0) { if (strlen(vstup2) == 0) {
break; break;
} }
} else { } else {