mirror of
https://github.com/krislamo/knrc.git
synced 2024-11-10 00:30:35 +00:00
22 lines
282 B
C
22 lines
282 B
C
#include <stdio.h>
|
|
|
|
int main()
|
|
{
|
|
int c, b, t, n;
|
|
|
|
b = 0;
|
|
t = 0;
|
|
n = 0;
|
|
while ((c = getchar ()) != EOF) {
|
|
if (c == ' ')
|
|
++b;
|
|
if (c == '\t')
|
|
++t;
|
|
if (c == '\n')
|
|
++n;
|
|
}
|
|
printf("blanks = %d\n", b);
|
|
printf("tabs = %d\n", t);
|
|
printf("newlines = %d\n", n);
|
|
}
|