void main() { int b[9999], n, i; cout<<"how many integers do you want to set? "; cin>>n; cout<<"enter "<<n<<" integers: "; for (i=0;i<n;i++) cin>>b[i]; cout<<"\neven:\n"; for (i=0;i<n;i++) if(!odd(b[i])) cout<<b[i]<<" "; cout<<"\n"; cout<<"\nodd:\n"; for (i=0;i<n;i++) if(odd(b[i])) cout<<b[i]<<" "; cout<<"\n"; }
Comments
Leave a comment