#include #include #include using namespace std; //Output the 12 elements of the array, and the subscript of each element, //with a for loop. int main() { const int a[] { 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 }; const size_t n {size(a)}; //the number of elements in the array for (int i {0}; i < n; ++i) { cout << setw(2) << i + 1 << " " << a[i] << "\n"; } return EXIT_SUCCESS; }