QUESTION : Change the array MONTHS to a vector and all related code…

Question Answered step-by-step QUESTION : Change the array MONTHS to a vector and all related code… QUESTION : Change the array MONTHS to a vector and all related code to use the vector related syntax. No array should exist in this code.  Edit this code I provided, need it to be easy to follow and explained what was edited. #include #include #include  using namespace std;const short MAX_MONTHS = 12;const string MONTHS[MAX_MONTHS] = { “January”, “February”,”March”,”April”,”May”,”June”,”July”,”August”,”September”,”October”,”November”,”December” };void showUSMonths(){for (string month : MONTHS){ cout << month << endl;}}string getUSMonth(int monthNumber){--monthNumber;string result = "invalid";if (monthNumber >= 0 && monthNumber < MAX_MONTHS){ result = MONTHS[monthNumber];}return result;}int main(){int userMonthNumber;showUSMonths();cout << "Enter a month number 1-12: ";cin >> userMonthNumber;cout << getUSMonth(userMonthNumber) << endl;cout << "Done!";} Computer Science Engineering & Technology C++ Programming COSC 1436 Share QuestionEmailCopy link Comments (0)