1049: [编程入门]结构体之时间设计 摘要:```c#include struct Data{ int year; int month; int day;}; int main() { struct…… 题解列表 2025年03月12日 1 点赞 0 评论 1072 浏览 评分:0.0
简单易懂的写法 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct year_month_day{ …… 题解列表 2025年04月10日 2 点赞 0 评论 599 浏览 评分:10.0
1049: [编程入门]结构体之时间设计 摘要:解题思路:1. 判断闰年:根据闰年规则(能被 4 整除但不能被 100 整除,或能被 400 整除)编写函数,确定年份是否为闰年,以调整 2 月天数。2. 设定每月天数:创建数组存储非闰年…… 题解列表 2025年04月10日 2 点赞 0 评论 911 浏览 评分:10.0
结构体之时间设计 解题思路:结构体注意事项:判断闰年参考代码:#includeusingnamespacestd;structyear_month_day{intyear;intmonth;intday;};intmain(){intt=0;intyear, 题解列表 2025年06月03日 1 点赞 0 评论 550 浏览 评分:10.0
结构体之时间设计 摘要:```#include using namespace std;struct Date { int day, month, year;};int main() {…… 题解列表 2025年07月02日 3 点赞 0 评论 561 浏览 评分:0.0
结构体时间设计参考 解题思路:首先判断年份是否是闰年还是平年,如果为闰年那么2月份就是29天,反之就是28天,最后将数据存储在数组中等待读取。然后在判断月份,根据每月天数累加(当前月份前的月份累加)再加上当前月份天数,就得到最终天数了。注意事项:注意闰年平年判断参考代码:#include/*思路:如果是 题解列表 2025年07月13日 0 点赞 0 评论 598 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d…… 题解列表 2025年07月24日 0 点赞 1 评论 484 浏览 评分:0.0
自己用类写的,感觉没有第二版好,可以看一下。 摘要:```cpp#includeusing namespace std;class Shijian{ private: int year; int month…… 题解列表 2025年08月25日 0 点赞 0 评论 512 浏览 评分:0.0
菜鸟记录,菜鸟记录 摘要:解题思路:注意事项:参考代码:#include<stdio.h>typedef struct { int y…… 题解列表 2025年10月16日 2 点赞 0 评论 720 浏览 评分:10.0
1049: [编程入门]结构体之时间设计 #include#include#include#definePI3.1415intmain(){inti,d=0;structdate{intyear;intmouth;intday;}date1;scanf("%d%d%d", 题解列表 2025年12月10日 1 点赞 0 评论 678 浏览 评分:0.0