全WA求调
查看原帖
全WA求调
1372558
paulyan楼主2024/8/20 19:11
#include <string>
#include <cstring>
using namespace std;
char ch[105];
int main(){
	int cnt=0;
	cin>>ch;//输入
	while(cin>>ch){
	    if(ch==" "){//判断长度与结束条件 
	    	cout<<cnt<<",";
	    	continue;
		}else if(ch=="."){
		    cout<<cnt;
			break;	
		}else{
			cnt++;
		}	
	}
	return 0;
}
2024/8/20 19:11
加载中...