#include<iostream>
#include<string.h>
using namespace std;
void fun(char *p)
{ int i;
int a,b,c;
a=b=c=0;
for(i=0;i<=strlen(p);i++)
{ if(*(p+i)>='A'&&*(p+i)<='Z')
a++;
if(*(p+i)>='a'&&*(p+i)<='z')
b++;
if(*(p+i)>='0'&&*(p+i)<='9')
c++;
// p++;
}
cout<<"该字符串中大写字母有"<<a<<"个"<<"小写字母有"<<b<<"个"<<"数字有"<<c<<"个"<<endl;
}
void main()
{ void fun(char *p);
char a[1000];
cout<<"请输入字符串"<<endl;
fun(gets(a));
}
#include<string.h>
using namespace std;
void fun(char *p)
{ int i;
int a,b,c;
a=b=c=0;
for(i=0;i<=strlen(p);i++)
{ if(*(p+i)>='A'&&*(p+i)<='Z')
a++;
if(*(p+i)>='a'&&*(p+i)<='z')
b++;
if(*(p+i)>='0'&&*(p+i)<='9')
c++;
// p++;
}
cout<<"该字符串中大写字母有"<<a<<"个"<<"小写字母有"<<b<<"个"<<"数字有"<<c<<"个"<<endl;
}
void main()
{ void fun(char *p);
char a[1000];
cout<<"请输入字符串"<<endl;
fun(gets(a));
}