先上代码
#include<iostream>
using namespace std;
bool run(int x)
{
if(x%4==0&&x%100!=0)
{
return 1;
}
if(x%400==0)
{
return 1;
}
else if(x%4!=0)
{
return 0;
}
}
bool yue(int c)
{
if(c!=2&&c<=12)
{
return 1;
}
else return 0;
}
bool yue_31or30(int b)
{
if((b==1||b==3||b==5||b==7||b==8||b==10||b==12)&&b<=12)
return 1;
else if((b==4||b==6||b==9||b==11)&&b<=12)
return 0;
}
本蒟蒻看不出问题,求大神指点,谢谢!