结构体之时间设计 摘要:解题思路:注意事项:参考代码:def leap(year): if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: …… 题解列表 2023年11月24日 1 点赞 0 评论 453 浏览 评分:10.0
不用结构体我照样写!!! 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int number = 0;int i = 0;int year = 0;int month = 0;int day = 0;//这…… 题解列表 2024年05月12日 1 点赞 0 评论 493 浏览 评分:10.0
自己做的新手,欢迎指导 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct date{ int year; int month; int day;};int mod(int y,i…… 题解列表 2024年12月20日 8 点赞 0 评论 845 浏览 评分:10.0
简单易于理解的天数问题——Python 摘要:a,b,c=map(int,input().strip().split())m=[31,28,31,30,31,30,31,…… 题解列表 2025年01月16日 1 点赞 0 评论 483 浏览 评分:10.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<stdio.h>typedef struct { int y…… 题解列表 2025年10月16日 2 点赞 0 评论 720 浏览 评分:10.0
较为】简洁 解题思路:整体思路可以分成三步。首先,读入年、月、日三个数据。由于日期包含多个相关信息,所以可以用结构体把年、月、日放在一起,这样逻辑更清晰。其次,判断输入年份是否是闰年。因为闰年和平年的区别主要体现在二月份:平年二月有28天,闰年二月有29天。 题解列表 2026年04月29日 3 点赞 0 评论 757 浏览 评分:10.0
C语言程序设计教程(第三版)课后习题11.1 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int month_day[2][13]={{0,31,29,31,30,31,30,31,31,30,31,30,31},{0,3…… 题解列表 2017年07月24日 0 点赞 0 评论 1869 浏览 评分:9.9