题解
2024-12-06 20:21:02
发布于:江苏
33阅读
0回复
0点赞
#include<iostream>
using namespace std;
int a[50];
int main(){
for(int i=0;i<30;i++){
cin>>a[i];
}
for(int i=0;i<30;i++){
if(a[i]%2==1){
if(a[i]!=0){
cout<<a[i]<<' ';
}
}
}
cout<<endl;
for(int i=0;i<30;i++){
if(a[i]%2==0){
if (a[i]!=0){
cout<<a[i]<<' ';
}
}
}
return 0;
}
这里空空如也
有帮助,赞一个