Initialization

This commit is contained in:
Kozar 2024-04-25 19:44:24 +02:00
parent 107d2b702a
commit 131968a488

View File

@ -24,8 +24,8 @@ int main() {
} }
i = 0; i = 0;
while (fgets(buffer, sizeof(buffer), stdin)) { while (i < count && fgets(buffer, sizeof(buffer), stdin)) {
if (buffer[0] == '\n' || i >= count) { // End of input or reached maximum count if (buffer[0] == '\n') { // End of input line
break; break;
} }
int len = strlen(buffer); int len = strlen(buffer);