删除字符串2 题解:
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
while(getline(cin,s)){
//字符串的复制
string b=s;
int len =s.length();
//先将所有字母转换为大写
for(int i=0;i<len;i++)
{
if(s[i]>='a'&&s[i]<='z'){
b[i]=b[i]-'a'+'A';
}
}
//遍历找GZU
for(int i=0;i<len;i++)...
登录后发布评论
暂无评论,来抢沙发