题解
2023-06-29 20:15:28
发布于:上海
151阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
getline(cin,s);
int b=0,a=s.length();
for(int i=0;i<a;i++){
if(s[i]==' '){
b=b;
}else{
b++;
}
}
cout<<b;
return 0;
}
这里空空如也
有帮助,赞一个