#include <iostream>
using namespace std;
int main()
{
int year, month;
cout << "Enter year: " << endl;
cin >> year;
cout << "Enter month: " <<endl;
cin >> month;
if (month == 1)
{
cout << "31 days";
}
else if (month == 2)
{
{
if (year % 4)
{
if (year % 4)
{
cout << "Common";
}
else
{
cout << "Leap";
}
}
else if (year % 100)
{
if (year % 100)
{
cout << "Leap";
}
else
{
cout << "Common";
}
}
else if (year % 400)
{
if (year % 400)
{
cout << "Common";
}
else
{
cout << "Leap";
}
}
else
{
cout << "Leap";
}
}
if ("Common")
{
cout << "28 days";
}
else
{
cout << "29 days";
}
}
...
else if (month == 12)
{
cout << "31 days";
}
return 0;
}