文章
38
粉丝
11
获赞
2
访问
31.0k
#include<bits/stdc++.h>
using namespace std;
int m[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
int judge(int year){//用于判断闰年,修改2月份天数,并返回这一年有多少天
int year_day;
if(year % 400 == 0|| year %4 == 0 && year % 100 != 0) {
m[2] = 29;
year_day = 366;
}
else {
m[2] = 28;
year_day = 365;
}
return year_day;
}
int main(){
int a,b;
while(cin >> a >> b){
int day = 0;
int a_day,a_month,a_year,b_day,b_month,b_year = 0;
a_day = a % 100;
a_month = a / 100 % 100;
a_year = a / 10000;
b_day = b % 100;
b_month = b / 100 % 100;
b_y...
登录后发布评论
暂无评论,来抢沙发