Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
291f19eb42 | 4 years ago |
@ -0,0 +1,18 @@
|
|||||||
|
# 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;
|
Loading…
Reference in new issue