Added more stupid coding files

This commit is contained in:
2020-12-07 09:12:18 +02:00
parent 463eceae52
commit 4811964a71
5 changed files with 12 additions and 9 deletions

BIN
charcount

Binary file not shown.

View File

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

BIN
getchar

Binary file not shown.

BIN
hello

Binary file not shown.

Binary file not shown.