上面是题目,我凑下三十个字。
麻了怎么凑都不行,搞的好麻烦,还不够,服了
int main()
{
char c;
int d = 0, l = 0, s = 0;
while (cin.get(c))
{
if (c == '\n')
break;
else if (c == ' ')
s++;
else if (c >= '0' && c <= '9')
d++;
else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
l++;
}
cout << d << " " << l << " " << s << endl;
return 0;
}