编写程序,统计输入的字符串中大写英文字母,小写英文字母,数字和其它字符的个数.(用数组 C++ )
编写程序,统计输入的字符串中大写英文字母,小写英文字母,数字和其它字符的个数.(用数组 C++ )
日期:2016-06-03 16:13:26 人气:1
#include
using namespace std;
int main(void)
{
int num,largeLetter,smallLetter,other;
num = largeLetter = smallLetter = other = 0;
char *s = new char[100];
cout<<"请输入一串字符:"<<endl;
gets(s);
while (*s != '\0')
{