14 lines
169 B
C
14 lines
169 B
C
|
#include <stdio.h>
|
||
|
|
||
|
/* count lines in input */
|
||
|
main()
|
||
|
{
|
||
|
int c, nl;
|
||
|
|
||
|
nl = 0;
|
||
|
while((c = getchar()) != EOF)
|
||
|
if (c == '\n')
|
||
|
++nl;
|
||
|
printf("%d\n", nl);
|
||
|
}
|