This repository has been archived on 2020-12-05. You can view files and clone it, but cannot push or open issues or pull requests.
Files
stupid-coding-files/charcount.c
2020-11-30 11:56:55 +02:00

14 lines
288 B
C

#include <stdio.h>
main (){
int c, nb,nt,nl = 0;
while ((c = getchar()) != EOF)
{
if(c='\0')
++nb;
if(c='\t')
++nt;
if(c='\n')
++nl;
}
printf("\nThere are %d blanks, %d tabs, and %d new lines\n", nb,nt,nl);
}