/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:lcount.c 12.0$ */
/* $ACIS:lcount.c 12.0$ */
/* $Source: /ibm/acis/usr/src/usr.bin/learn/RCS/lcount.c,v $ */

#ifndef lint
static char *rcsid = "$Header:lcount.c 12.0$";
#endif

#ifndef lint
static char sccsid[] = "@(#)lcount.c	4.2	(Berkeley)	4/25/83";
#endif not lint

#include "stdio.h"

main()	/* count lines in something */
{
	register n, c;

	n = 0;
	while ((c = getchar()) != EOF)
		if (c == '\n')
			n++;
	printf("%d\n", n);
}
