fork download
  1. #include <iostream>
  2. #include <iterator>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main() {
  8. int array[] = {1,2,3,4,5,6,7,8,9,10,11,12,13};
  9. ostream_iterator<int> out_it (cout," ");
  10. copy ( array+3, array+6, out_it );
  11. return 0;
  12. }
Success #stdin #stdout 0.02s 2680KB
stdin
Standard input is empty
stdout
4 5 6