1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d…… 题解列表 2025年07月24日 0 点赞 0 评论 41 浏览 评分:0.0
结构体时间设计参考 摘要:解题思路:首先判断年份是否是闰年还是平年,如果为闰年那么2月份就是29天,反之就是28天,最后将数据存储在数组中等待读取。然后在判断月份,根据每月天数累加(当前月份前的月份累加)再加上当前月份天数,就…… 题解列表 2025年07月13日 0 点赞 0 评论 93 浏览 评分:0.0
结构体之时间设计 摘要:```#include using namespace std;struct Date { int day, month, year;};int main() {…… 题解列表 2025年07月02日 1 点赞 0 评论 206 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:结构体注意事项:判断闰年参考代码:#include<bits/stdc++.h>using namespace std;struct year_month_day{int yea…… 题解列表 2025年06月03日 1 点赞 0 评论 177 浏览 评分:10.0
1049: [编程入门]结构体之时间设计 摘要:解题思路:1. 判断闰年:根据闰年规则(能被 4 整除但不能被 100 整除,或能被 400 整除)编写函数,确定年份是否为闰年,以调整 2 月天数。2. 设定每月天数:创建数组存储非闰年…… 题解列表 2025年04月10日 2 点赞 0 评论 401 浏览 评分:0.0
简单易懂的写法 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct year_month_day{ …… 题解列表 2025年04月10日 2 点赞 0 评论 223 浏览 评分:10.0
1049: [编程入门]结构体之时间设计 摘要:```c#include struct Data{ int year; int month; int day;}; int main() { struct…… 题解列表 2025年03月12日 1 点赞 0 评论 661 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:注意事项:注意7,8月份都是31天参考代码:#include <stdio.h>int pdrn(int year);struct fal{ int y…… 题解列表 2025年02月28日 0 点赞 0 评论 356 浏览 评分:0.0
简单易于理解的天数问题——Python 摘要:a,b,c=map(int,input().strip().split())m=[31,28,31,30,31,30,31,…… 题解列表 2025年01月16日 1 点赞 0 评论 197 浏览 评分:10.0
[编程入门]结构体之时间设计 极简利用函数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int days(int i){ int t=0; int num=0; int a[13]={0,31,28,31,…… 题解列表 2024年12月26日 0 点赞 0 评论 554 浏览 评分:0.0