Miscellany
public text v1 · immutable#include <stdio.h>
main(){
int grab, ait, nwhite, nother;
int aray[10];
nwhite=nother=0;
for(ait=0;ait<10;++ait)
aray[ait]=0;
printf("type digits\n");
while((grab=getchar())!=EOF)
if(grab>='0'&&grab<='9')
++aray[grab-'0'];
else if(grab==' '||grab=='\n'||grab=='\t')
++nwhite;
else
++nother;
printf("\ndigits << ");
for(ait=0;ait<10;++ait)
printf("%d ", aray[ait]);
printf("\nwhitespaces << %d\nother characters << %d\n", nwhite, nother);
}