#include #include using namespace std; //Output the 12 elements of the array, one per line. int main() { 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 }; //The number of elements in the array. //int n {sizeof a / sizeof a[0]}; //old fashioned C++ int n {size(a)}; //current C++ cout << "The array contains " << n << " elements. Here they are:\n\n"; for (int i {0}; i < n; ++i) { cout << a[i] << "\n"; } return EXIT_SUCCESS; }