#include #include #include using namespace std; int main() { //Create a new data type, named "month". struct month { string name; int length; }; //Create 12 variables of the new data type. //Each variable holds two "fields": a name and a length. month january {"January", 31}; month february {"February", 28}; //assume non-leap month march {"March", 31}; month april {"April", 30}; month may {"May", 31}; month june {"June", 30}; month july {"July", 31}; month august {"August", 31}; month september {"September", 30}; month october {"October", 31}; month november {"November", 30}; month december {"December", 31}; //Output the two fields of each structure. Wish we could use a loop. cout << january.name << " has " << january.length << " days.\n"; cout << february.name << " has " << february.length << " days.\n"; cout << march.name << " has " << march.length << " days.\n"; cout << april.name << " has " << april.length << " days.\n"; cout << may.name << " has " << may.length << " days.\n"; cout << june.name << " has " << june.length << " days.\n"; cout << july.name << " has " << july.length << " days.\n"; cout << august.name << " has " << august.length << " days.\n"; cout << september.name << " has " << september.length << " days.\n"; cout << october.name << " has " << october.length << " days.\n"; cout << november.name << " has " << november.length << " days.\n"; cout << december.name << " has " << december.length << " days.\n"; return EXIT_SUCCESS; }