题解 1049: [编程入门]结构体之时间设计

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

结构体之时间设计

摘要:解题思路:注意事项:参考代码:def leap(year):    if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:        ……

自己做的新手,欢迎指导

摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct date{    int year;    int month;    int day;};int mod(int y,i……

简单易懂的写法

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct year_month_day{ ……

1049: [编程入门]结构体之时间设计

摘要:解题思路:1. 判断闰年:根据闰年规则(能被 4 整除但不能被 100 整除,或能被 400 整除)编写函数,确定年份是否为闰年,以调整 2 月天数。2. 设定每月天数:创建数组存储非闰年……

结构体之时间设计

摘要:解题思路:结构体注意事项:判断闰年参考代码:#include<bits/stdc++.h>using namespace std;struct year_month_day{int yea……