revcopy1.cpp

We use cookies. Read the Privacy and Cookie Policy

revcopy1.cpp

#include ‹stl.h›

#include ‹iostream.h›

int numbers[6] = {0, 1, 2, 3, 4, 5};

int main() {

 int result[6];

 reverse_copy(numbers, numbers + 6, result);

 for (int i = 0; i ‹ 6; i++) cout ‹‹ numbers[i] ‹‹ ;

 cout ‹‹ endl;

 for (i = 0; i ‹ 6; i++) cout ‹‹ result[i] ‹‹ ;

 cout ‹‹ endl;

 return 0;

}