![]() |
#2
peach54602013-03-22 13:15
|
while写的

int iy=0,iz=0;
while(iy!=6){
while(iz!=8){
if(shu1[iy]==shu2[iz]){
cout<<shu1[iy]<<endl;
++iz; }
else{ ++iz; }
}
++iy; }
while(iy!=6){
while(iz!=8){
if(shu1[iy]==shu2[iz]){
cout<<shu1[iy]<<endl;
++iz; }
else{ ++iz; }
}
++iy; }
for写的
for (int i=0;i<6;++i)
{
for(int j=0;j<8;++j)
{
if (shu1[i]==shu2[j])
{
cout<<shu1[i]<<' ';
}
}
}