by CodeChum Admin
We're done dealing with days. It's time to step up and now deal with months!
Instructions:
Output
January·=·1
February·=·2
March·=·3
April·=·4
May·=·5
June·=·6
July·=·7
August·=·8
September·=·9
October·=·10
November·=·11
December·=·12
#include <bits/stdc++.h>
using namespace std;
enum month {
January = 1,
February,
March,
April,
May,
June,
July,
August,
September,
October,
November,
December
};
int main()
{
cout << January << endl;
cout << February << endl;
cout << March << endl;
cout << April << endl;
cout << May << endl;
cout << June << endl;
cout << July << endl;
cout << August << endl;
cout << September << endl;
cout << October << endl;
cout << November << endl;
cout << December << endl;
/*or just
for (int i = January; i <= December; i++)
cout << i << " ";
*/
return 0;
}
Comments
Leave a comment