返回题解分享
讨论 / 题解分享/ 帖子详情

作文标题 - 题解

#include<bits/stdc++.h>
using namespace std;
#define MaxSize 100

int sum;

int main(){
	string str;
	getline(cin,str);
	
	int n=str.length();
	for(int i=0; i<n; i++){
		if(str[i]!=' '&&str[i]!='\n')
			sum++;
	}
	cout<<sum<<endl;
	
	return 0;
}
0 回复 0 转发 0 喜欢 2 阅读
回复 (0)
默认 最新
暂无回复,快来抢沙发!