#include #include //for the iomanipulator setw #include #include //for the algorithm std::copy using namespace std; int main() { int a[] { //An array of 12 ints. 31, // 0 January 28, // 1 February 31, // 2 March 30, // 3 April 31, // 4 May 30, // 5 June 31, // 6 July 31, // 7 August 30, // 8 September 31, // 9 October 30, //10 November 31 //11 December }; int b[12] {}; //Born holding 12 zeros. //Copy all of the values in the array a into the array b, //wiping out the 12 zeros. copy(begin(a), end(a), begin(b)); //Make sure that the values got copied. int n {size(b)}; //the number of elements in the array b for (int i {0}; i < n; ++i) { cout << setw(2) << i << " " << b[i] << "\n"; } return EXIT_SUCCESS; }