Initialization
This commit is contained in:
parent
131968a488
commit
0f678a08bc
@ -25,9 +25,6 @@ int main() {
|
|||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (i < count && fgets(buffer, sizeof(buffer), stdin)) {
|
while (i < count && fgets(buffer, sizeof(buffer), stdin)) {
|
||||||
if (buffer[0] == '\n') { // End of input line
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
int len = strlen(buffer);
|
int len = strlen(buffer);
|
||||||
if (len > 0 && buffer[len - 1] == '\n') { // Remove newline character if present
|
if (len > 0 && buffer[len - 1] == '\n') { // Remove newline character if present
|
||||||
buffer[len - 1] = '\0';
|
buffer[len - 1] = '\0';
|
||||||
|
Loading…
Reference in New Issue
Block a user