第1个回答 2009-12-03
#include<stdio.h>
main()
{
int a[];
int m,p,q,o;
printf("Please enter a string that contains 10 chars:\n");
for(i=0;i<=9;i++){
scanf("d%",&a[i]);
}
if((a[i]>=65&&a[i]<=90)||(a[i]>=97&&a[i]<=122))
++m;
else if(a[i]>='0'&&a[i]<='9')
++p;
else if(a[i]=' ')
++q;
else
++o;
printf("There are %d digital,%d number,%d space and %d other character in the string.\n",m,p,q,o);
}