题解
2024-11-24 18:50:10
发布于:江苏
13阅读
0回复
0点赞
#include<iostream>
#include<cstring>
using namespace std;
int main(){
char c[110];
cin>>c;
int n=strlen(c);
for(int i=0;i<n;i++){
if(c[i]=='e'){
c[i]='t';
}else if(c[i]=='h'){
c[i]='Q';
}
cout<<c[i];
}
return 0;
}
#include<iostream>
#include<string>
using namespace std;
int main(){
string c;
cin>>c;
for(int i=0;i<c.size();i++){
if(c[i]=='e'){
c[i]='t';
}else if(c[i]=='h'){
c[i]='Q';
}
cout<<c[i];
}
return 0;
}
这里空空如也
有帮助,赞一个