#include<iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
int main()
{
char str[100] = {0};
cout << "请输入字符串:" << endl;
gets(str);
// 英文字母
int englishNum = 0;
int otherNum = 0;
for (int i = 0; i < strlen(str);i++)
{
if ((str[i] >= 'A' && str[i] <= 'Z')
|| (str[i]) >= 'a' && str[i] <= 'z')
{
englishNum++;
}
else
{
otherNum++;
}
}
cout << "英文字母: "<< englishNum << "其他字符: " << otherNum << endl;
return 0;
}