Initialization
This commit is contained in:
parent
107d2b702a
commit
131968a488
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user