#include #include #include using namespace std; int main() { //Create a new data type, named "month". struct month { string name; int length; }; //Create an array of 12 months: month a[] { {"January", 31}, {"February", 28}, //assume non-leap {"March", 31}, {"April", 30}, {"May", 31}, {"June", 30}, {"July", 31}, {"August", 31}, {"September", 30}, {"October", 31}, {"November", 30}, {"December", 31} }; //Loop through the array with a range for loop. //The variable m is a month because a is an array of months. for (auto m: a) { cout << m.name << " has " << m.length << " days.\n"; } return EXIT_SUCCESS; }