#include #include #include using namespace std; int main () { const int a[] { 0, //filler 0, //Jan 0, 5, //March 26, 29, //May 27, 25, //July 27, 23, //Sep 0, 0, 0 }; int nummonth {0}; cout << "Enter a number to find out how many games the Yankees play that month (1=Jan 2=Feb 3=Mar etc)\n"; cin >> nummonth; if (!cin) { cerr << "Sorry invalid input.\n"; return EXIT_FAILURE; } if (nummonth >= 1 && nummonth <=12) { cout << "In month " << nummonth << " the Yankees will play " << a[nummonth] << " games.\n"; } else { cout << "Must input a number between 1 and 12.\n"; } return EXIT_SUCCESS; }