#include #include #include #include using namespace std; int main() { //Create a new data type, named "month". struct month { string name; int length; double temperature; }; //Create an array of 12 months: month a[] { {"January", 31, 43.5}, {"February", 28, 41.1}, //assume non-leap {"March", 31, 45.5}, {"April", 30, 47.7}, {"May", 31, 59.2}, {"June", 30, 79.9}, {"June", 31, 88.8}, {"August", 31, 97.7}, {"September", 30, 77.7}, {"October", 31, 65.6}, {"November", 30, 57.3}, {"December", 31, 32.2} }; //Loop through the array with a plain old for loop. int n {end(a) - begin(a)}; //the number of elements in the array. for (int i {0}; i < n; ++i) { cout << left << setw(9) << a[i].name << " (month number " << right << setw(2) << i+1 << ") has " << a[i].length << " days." <<"the average temperature in 2023 was" << a[i].temperature << ".\n"; } return EXIT_SUCCESS; }