要求结果为19 15 7 11 9 32 54 88 100 10
#include<iostream>
using namespace std;
int main()
{
int m[]={10,15,32,11,9,7,54,88,100,19};
int *ps=m,*pe=m+sizeof(m)/sizeof(int),t,i;
for(i=0;i<sizeof(m)/sizeof(int);i++)
cout<<m[i]<<" ";
cout<<endl;
while( )
{
while((*ps)%2!=0 && ps<pe)
;
while( && ps<pe)
;
t=*ps;
*ps=*pe;
*pc=t;
}
for(i=0;i<sizeof(m)/sizeof(int);i++)
cout<<m[i]<<" ";
cout<<endl;
return 0;
}