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.
21 lines
464 B
21 lines
464 B
#include<stdio.h>
|
|
int a=0,b=0,c=0,d=0,e=0;
|
|
void fun(char ch[])
|
|
{
|
|
for(int i = 0; i < 10; i ++)
|
|
{
|
|
if(ch[i]>='A'&&ch[i]<='Z') a++;
|
|
else if(ch[i]>='a'&&ch[i]<='z') b++;
|
|
else if(ch[i]>='0'&&ch[i]<='9') c++;
|
|
else if(ch[i]==' ')d++;
|
|
else e++;
|
|
}
|
|
}
|
|
int main()
|
|
{
|
|
char ch[10];
|
|
scanf("%s",ch);
|
|
fun(ch);
|
|
printf("majuscule=%d\nb=%d\nnum=%d\nblank=%d\nothers=%d",a,b,c,d,e);
|
|
return 0;
|
|
} |