Messing around

This commit is contained in:
2020-11-30 11:56:55 +02:00
parent 852583759c
commit 463eceae52
6 changed files with 46 additions and 0 deletions

14
charcount.c Normal file
View File

@@ -0,0 +1,14 @@
#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);
}