时间问题小模板 摘要:因为闰年平年二月份的天数不同,首先利用数组解决闰年平年问题,用check函数判断是否是闰年,并对数组作出相应修改。然后 可以先把每月 余出的几天单独拿出来, 例如12月5号 可以把这个5单独拿出来,…… 题解列表 2022年09月09日 0 点赞 0 评论 761 浏览 评分:0.0
1049-结构体之时间设计 摘要:解题思路:注意事项:参考代码:/*天数问题:1、3、5、7、8、10、12月:31天4、6、9、11月:30天2月:非闰年有28天,闰年有29天 闰年特点:1) 4的倍数,不是100的倍数2) 400…… 题解列表 2022年10月06日 0 点赞 0 评论 471 浏览 评分:0.0
结构体之时间设计 #include#include#include#includeusingnamespacestd;structdemo{intyear;intmonth;intday;};intmain(){structdemodate={0};inty=date.year;intm=date.month;intd 题解列表 2022年10月12日 0 点赞 0 评论 438 浏览 评分:0.0
结构体与时间设计C语言 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct Date{ int year; int mouth; int day;}data;int main(){ int i=0;…… 题解列表 2022年12月06日 0 点赞 0 评论 488 浏览 评分:0.0
思路清晰 switch+if 就OK了 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ struct time { int year; int mon; in…… 题解列表 2022年12月27日 0 点赞 0 评论 461 浏览 评分:0.0
一种超简单的方法 [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct date{ int year; int month; int day;};int main(){ str…… 题解列表 2023年01月10日 0 点赞 0 评论 485 浏览 评分:0.0
结构体之时间设计(C语言) 摘要:#include<stdio.h> typedef struct date { int year; int month; int day; }DATE; int main() {…… 题解列表 2023年01月11日 0 点赞 0 评论 499 浏览 评分:0.0
日期非结构解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n, y, r; int h; int i; int sum=0; scanf("%d%d%d", &n…… 题解列表 2023年01月20日 0 点赞 0 评论 430 浏览 评分:0.0
结构体之时间设计C语言 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>struct date{ int year; int month; int d…… 题解列表 2023年02月02日 0 点赞 0 评论 497 浏览 评分:0.0
python求解年月日问题 解题思路:注意事项:参考代码:year,month,day=map(int,input().split())sum=daydays=[31,28,31,30,31,30,31,31,30,31,30,31]i=0if(year%4==0andyear%100!=0)or(year%400==0):da 题解列表 2023年02月26日 0 点赞 0 评论 519 浏览 评分:0.0