第4个回答 2008-10-14
#include <iostream.h>
#include <string.h>
#include <ctype.h>
int main(){
char st[1000];
int i,l;
int S=0,L=0;
cin.getline(st,990);
l=strlen(st);
for(i=0;i<l;i++)
if(isalpha(st[i]))
if(st[i]>='A'&&st[i]<='Z')
L++;
else
S++;
cout<<"大="<<L<<endl;
cout<<"小="<<S<<endl;
return 0;
}本回答被提问者采纳