#include #include #include #include #include #include using namespace std; //myAlgo_replace_copy1.cpp int main() { int n1[10] = { 69 ,75,63,61,65,64,68,64,71,70 }; int n2[10] = { 19 ,25,23,31,35,34,38,24,21,20 }; vectorv1(n1, n1+10), v2(n2,n2+10); vector::iterator it; ostream_iterator< int > output( cout, " " ); cout<<"\n original array v1 \n\t \b "; copy(v1.begin(),v1.end(), output); cout<<"\n original v2 \n\t \b "; copy(v2.begin(),v2.end(), output); // replace 75 with 72 replace(v1.begin(), v1.end(),75,72); cout<<"\n replace 75 with 72 in v1 \n\t"; copy(v1.begin(),v1.end(), output); replace_copy(v1.begin(), v1.begin()+8, v2.begin(),71,70); cout<<"\n replace_copy elements in v2"; cout<<"\n except 20,21; new v2 \n\t \b"; copy(v2.begin(),v2.end(), output); cout<