Лови
int main(int argc, char** argv)
{
int m, d, err = 0;
string month [12] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
cout << "Day and month: ";<br>cin >> d >> m;
if (m < 1 || m > 12 || d < 1) err = 1;
if (m==2)
{
if (d>28) err = 1;
if (d==28)
{
d=1;
m=3;
}
else ++d;
}
else
if ((m==4 || (m==6) || (m==9) || (m==11))
{
if (d>30) err = 1;
if (d==30)
{
d=1;
++m;
}
else ++d;
}
else
{
if (d>31) err = 1;
if (d==31) {
d = 1;
++m;
if(m==13) m =1;
}
else ++d;
}
if (err==0)
{
cout << "Next day: " << d << " " month[m-1];<br>}
else
cout << "Wrong!!!";<br>return 0;
}