usaco 里的Friday the Thirteenth请牛人帮忙/*ID:handsom1PROG:fridayLANG:C++*/#include #include using namespace std;int judge(int y){if ((y % 100 && y % 4 == 0 ) || y % 400 == 0 )return 29;else return 28;}int main(){int month[13],day[7],year=1900
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/06 08:35:49
usaco 里的Friday the Thirteenth请牛人帮忙/*ID:handsom1PROG:fridayLANG:C++*/#include #include using namespace std;int judge(int y){if ((y % 100 && y % 4 == 0 ) || y % 400 == 0 )return 29;else return 28;}int main(){int month[13],day[7],year=1900
usaco 里的Friday the Thirteenth请牛人帮忙
/*
ID:handsom1
PROG:friday
LANG:C++
*/
#include
#include
using namespace std;
int judge(int y)
{
if ((y % 100 && y % 4 == 0 ) || y % 400 == 0 )
return 29;
else return 28;
}
int main()
{
int month[13],day[7],year=1900,n,all=13;
month[1]=month[3]=month[5]=month[7]=month[8]=month[10]=month[12]=31;
month[4]=month[6]=month[9]=month[11]=30;
for (int i=0;i>n;
for (int j=0;j
usaco 里的Friday the Thirteenth请牛人帮忙/*ID:handsom1PROG:fridayLANG:C++*/#include #include using namespace std;int judge(int y){if ((y % 100 && y % 4 == 0 ) || y % 400 == 0 )return 29;else return 28;}int main(){int month[13],day[7],year=1900
judge有问题……
if (y%4==0&&y%100==0)
难道有 y%100==0但y%4!=0的吗?
int judge(int y)
{
if ((y%4==0&&y%100!=0)||(y%400==0))return 29;
return 28;
}
//粗心又犯了,已修改.