ee6067e2 KM |
1 | #ifndef lint |
2 | static char sccsid[] = "@(#)lcount.c 4.1 (Berkeley) %G%"; |
3 | #endif not lint |
4 | |
5 | #include "stdio.h" |
6 | |
7 | main() /* count lines in something */ |
8 | { |
9 | register n, c; |
10 | |
11 | n = 0; |
12 | while ((c = getchar()) != EOF) |
13 | if (c == '\n') |
14 | n++; |
15 | printf("%d\n", n); |
16 | } |