#include #include #include #include using namespace std; int main() { //Create a new data type, named "month". struct month { string name; // Name of the month int length; // Number of days in the month double temperature; // Average temperature in 2023 (Fahrenheit) }; //Create an array of 12 months: month a[] { {"January", 31, 43.5}, {"February", 28, 41.1}, // Assume non-leap {"March", 31, 50.2}, {"April", 30, 56.3}, {"May", 31, 65.7}, {"June", 30, 73.1}, {"July", 31, 79.5}, {"August", 31, 78.6}, {"September", 30, 71.2}, {"October", 31, 59.8}, {"November", 30, 50.0}, {"December", 31, 42.7} }; //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.\n"; } return EXIT_SUCCESS; }