37 lines
1019 B
C
37 lines
1019 B
C
static char sccsid[] = "@(#)16 1.4 src/bos/usr/lib/learn/bin/lcount.c, cmdlearn, bos411, 9428A410j 3/22/93 13:30:21";
|
|
/*
|
|
* COMPONENT_NAME: (CMDLEARN) provides computer-aided instruction courses
|
|
*
|
|
* FUNCTIONS: none
|
|
*
|
|
* ORIGINS: 26, 27
|
|
*
|
|
* This module contains IBM CONFIDENTIAL code. -- (IBM
|
|
* Confidential Restricted when combined with the aggregated
|
|
* modules for this product)
|
|
* SOURCE MATERIALS
|
|
* (C) COPYRIGHT International Business Machines Corp. 1989, 1993
|
|
* All Rights Reserved
|
|
*
|
|
* US Government Users Restricted Rights - Use, duplication or
|
|
* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
|
|
*
|
|
* Copyright (c) 1980 Regents of the University of California.
|
|
* All rights reserved. The Berkeley software License Agreement
|
|
* specifies the terms and conditions for redistribution.
|
|
*/
|
|
|
|
#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);
|
|
exit(0);
|
|
}
|