"Programming Paradise"
Some insights of programming concepts and tips of 1.c , 2.matlab , 3.vhdl
Friday, 12 October 2012
c programm to count the number of lines
#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);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment