#include <iostream>
#include <string>
using namespace std;
int main ()
{
int yingwen=0,kongge=0,shuzi=0,qita=0;
string str;
getline(cin,str);
int len=str.size();
for(int i=0;i<len;i++)
if((str.at(i)>='a' && str.at(i)<='z') || (str.at(i)>='A' && str.at(i)<='Z'))
yingwen++;
else if(str.at(i)==' ')
kongge++;
else if(str.at(i)>='0' && str.at(i)<='9')
shuzi++;
else qita++;
cout<<yingwen<<endl;
cout<<kongge<<endl;
cout<<shuzi<<endl;
cout<<qita<<endl;
return 0;
}
0.0分
0 人评分
剪刀石头布 (C语言代码)浏览:700 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:757 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:533 |
A+B for Input-Output Practice (V) (C语言代码)浏览:444 |
A+B for Input-Output Practice (VI) (C语言代码)浏览:542 |
C语言程序设计教程(第三版)课后习题11.5 (C语言代码)浏览:1469 |
GC的苦恼 (C语言代码)浏览:609 |
【偶数求和】 (C语言代码)浏览:415 |
P1044 (C++代码)浏览:453 |
龟兔赛跑预测 (C++代码)浏览:1148 |