You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
355 B

# Collectionofmultiplefunctions
#include<stdio.h>
int main(int argc,char *argv[])
{
int digit=0,space=0,letter=0,other=0;
char c;
while((c=getchar())!='\n')
if( c<='9' && c>='θ')
digit++;
else if((c<='z' && c>='a') || (c<='Z' && c>='A') )
letter++;
else if( c ==' ')
space++;
else
other++;
}
printf("%d %d %d %d\n",letter,digit,space,other);
return 0;