下列程序的运行结果是1 2 3 4 3 6 5,请将横线处缺失程序补充完整...
发布于 2022-03-03 15:12:19
下列程序的运行结果是1 2 3 4 3 6 5,请将横线处缺失程序补充完整()
#include#include#includeusing namespace stdint main() { int iarray[]={1,1,2,7,4,6,5} vectorivector(iarray,iarray+sizeof(iarray)/sizeof(int)) ivector[0]=adjacent_find(ivector.begin(),ivector.end()) ivector[1]=count(ivector.begin(),ivector.end(),1) ivector[2]=count_if(ivector.begin(),ivector.end(),bind2nd(less(), )) ivector[3]=find(ivector.begin(),ivector.end(),4) ivector[4]=*find_if(ivector.begin(),ivector.end(),bind2nd(greater(),2)) for(int i=0i<ivector.size()i++) cout<<ivector[i]<<" " return 0 }ivector[0]=adjacent_find(ivector.begin(),ivector.end()) ivector[1]=count(ivector.begin(),ivector.end(),1) ivector[2]=count_if(ivector.begin(),ivector.end(),bind2nd(less(), )) ivector[3]=ivector[1]=count(ivector.begin(),ivector.end(),1)ivector[2]=count_if(ivector.begin(),ivector.end(),bind2nd(less(), )) ivector[3]=ivector[3]=find(ivector.begin(),ivector.end(),4)ivector[4]=*find_if(ivector.begin(),ivector.end(),bind2nd(greater(),2)) for(int i=0i<ivector.size()i++) cout<<ivector[i]<<" " return 0 }for(int i=0i<ivector.size()i++)cout<<ivector[i]<<" "return 0}
登录后免费查看答案
关注者
0
被浏览
22