Computer Science, asked by shekharkumar454, 2 months ago

WAP to display the month of the year entered by number like 1 for junwary upto 12 for DDecember ( Write a program)

Answers

Answered by TaeTaePopsicle
9

Answer:

}

return (0);

}

#include <iostream>

#include <string>

using namespace std;

int main()

{

int m;

string months[] = {"Jan", "Feb", "Mar", "Apr", "May",

"Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

cout << "Enter a month number: ";

cin >> m;

cout << "You selected " << months[m-1] << endl;

return 0;

}

Similar questions