This commit is contained in:
Weber 2024-02-21 18:48:41 +00:00
parent 6034da31ab
commit f1715bc3eb

View File

@ -2,7 +2,7 @@
int main() {
char ch;
int line_count = 1;
int line_count = 0;
while ((ch = getchar()) != EOF) {
if (ch == '\n') {
@ -13,7 +13,7 @@ int main() {
}
putchar('\n');
printf("Lines count: %d\n", line_count);
printf("\nLines count: %d\n", line_count);
return 0;
}