好了
2025-06-30 15:54:49
发布于:浙江
2阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
struct stu{
string name;
string pd;
string email;
}user[10001];
int main(){
string e;
cin>>e;
int n;
cin>>n;
for(int i=1;i<=n;i++){
cin>>user[i].name>>user[i].pd>>user[i].email;
}
bool f=0;
for(int i=1;i<=n;i++){
if(user[i].email==e){
string s=user[i].pd;
for(int j=0;j<s.length();j++){
if(s[j]>='A'&&s[j]<='Z'){
s[j]=s[j]+32;
}
else if(s[j]>='a'&&s[j]<='z'){
s[j]=s[j]-32;
}
}
user[i].pd=s;
f=1;
cout<<user[i].name<< " "<<user[i].pd<<endl;
}
}
if(f==0){
cout<<"empty";
}
return 0;
}
这里空空如也
有帮助,赞一个