#include #include //for the i/o manipulators setw, left, right #include #include using namespace std; int main() { double temperature; //2025 average, in farenheit //Create a new data type, named "month". struct month { string name; int length; }; //Create an array of 12 const months: const month a[] { {"January", 31, 32.5}, {"February", 28, 21.0}, //assume non-leap {"March", 31, 43.7}, {"April", 30, 59.2}, {"May", 31, 67.9}, {"June", 30, 79.7}, {"July", 31, 89.6}, {"August", 31, 94.5}, {"September", 30, 87.3}, {"October", 31, 63.1}, {"November", 30, 50.3}, {"December", 31, 38.4} }; //Loop through the array with a plain old for loop. const size_t n {size(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 " << setw(2) << a[i].length << " days.\n"; } return EXIT_SUCCESS; }