结构体之时间设计(非结构体) 摘要:解题思路:初学者 结构体 不熟练 不知道哪里该用结构体 就想了一个不用结构体的注意事项:参考代码:#include<stdio.h>struct name { int year; int month;…… 题解列表 2023年05月19日 0 点赞 0 评论 509 浏览 评分:0.0
python天数计算——挑战最简解 摘要:python就不讲什么结构体了,咱没有这玩意参考代码:year, month, day = map(int, input().split()) days1 = [31, 28, 31, 30, 31…… 题解列表 2023年08月19日 1 点赞 0 评论 587 浏览 评分:0.0
结构体之时间设计规范解 解题思路:使用isLeapYear函数来判断输入的年份是否为闰年,该函数返回1表示是闰年,返回0表示不是闰年。然后,使用calculateDayOfYear函数来计算该日在本年中是第几天。在函数中,使用了一个数组daysInMonth来存储每个月份的天数。 题解列表 2023年08月21日 0 点赞 0 评论 660 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int judge(int n) { if (n % 4 == 0 && …… 题解列表 2023年09月29日 0 点赞 0 评论 456 浏览 评分:0.0
结构体之时间设计C语言 ```c#define_CRT_SECURE_NO_WARNINGS1#includeintmain(){inta[12]={31,28,31,30,31,30,31,31,30,31,30,31};intnian,yue,ri,i,sum=0;scanf("%d", 题解列表 2023年10月07日 0 点赞 0 评论 478 浏览 评分:0.0
结构体之时间设计(简单C语言) 摘要:解题思路:1月到12月没什么规律,所以用个数组来累加,累加玩后在month>=3月开始判断是闰年与否,是的话sum++注意事项:参考代码:#include<stdio.h>#include<stdli…… 题解列表 2023年10月14日 0 点赞 0 评论 523 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct sjb { int year; int month; int day;} sj;int main(){ int sum =…… 题解列表 2023年12月05日 0 点赞 0 评论 706 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;struct date{ int n,y,r;};int m[13]= {0…… 题解列表 2023年12月09日 0 点赞 0 评论 812 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 ```pythonclassYear:def__init__(self):passdefput(self,year,mon,day):self.year=yearself.mon=monself.day=daydefcalculate(self):days=0foriinrange(1, 题解列表 2023年12月20日 1 点赞 0 评论 481 浏览 评分:0.0
c代码记录之结构体时间设计 #includestructTime{intyear,month,day;}_time;intmain(){scanf("%d%d%d",&_time.year,&_time.month,&_time.day);inti,sum=0,days[12]={0, 题解列表 2023年12月29日 0 点赞 0 评论 475 浏览 评分:0.0