数组岂不妙哉
2024-09-07 15:07:48
发布于:云南
1阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int a[1005];
int main(){
int n; cin >> n;
for(int i = 1;i <= n;i++) cin >> a[i];
int x,y; cin >> x >> y;
for(int i = 1;i <= n;i++){
cout << a[i] << " ";
if(a[i] == x) cout << y << " ";
}
return 0;
}
这里空空如也
有帮助,赞一个