文章
75
粉丝
0
获赞
153
访问
8.9k
#include <bits/stdc++.h>
using namespace std;
int main()
{
string s ;
while(getline(cin,s)){
int temp = 0;
for(int i = 0 ; i < s.size() ; i++){
if(s[i] != ' ' && s[i] != '.') temp++; //判断结尾 ,进行单词字母 统计
else{
if(temp){
cout << temp << " ";
temp = 0;
}
}
}
cout << endl;
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发