结构体之时间设计C语言 摘要:```c #define _CRT_SECURE_NO_WARNINGS 1 #include int main() { int a[12] = { 31,28,31,30,31,30,…… 题解列表 2023年10月07日 0 点赞 0 评论 134 浏览 评分:0.0
结构体之时间设计(简单C语言) 摘要:解题思路:1月到12月没什么规律,所以用个数组来累加,累加玩后在month>=3月开始判断是闰年与否,是的话sum++注意事项:参考代码:#include<stdio.h>#include<stdli…… 题解列表 2023年10月14日 0 点赞 0 评论 138 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:注意事项:参考代码:def leap(year): if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0: …… 题解列表 2023年11月24日 0 点赞 0 评论 127 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct sjb { int year; int month; int day;} sj;int main(){ int sum =…… 题解列表 2023年12月05日 0 点赞 0 评论 333 浏览 评分: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 评论 197 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 摘要:```python class Year: def __init__(self): pass def put(self,year,mon,day): …… 题解列表 2023年12月20日 0 点赞 0 评论 129 浏览 评分:0.0
c代码记录之结构体时间设计 摘要: #include struct Time{ int year,month,day; }_time; int main(){ s…… 题解列表 2023年12月29日 0 点赞 0 评论 122 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:先根据年份判断平闰年调用函数实现天数判断最后返回天数即可注意事项:在定义类的时候不能定义为已有的函数名称,否则报错参考代码:#include<iostream>using namespace…… 题解列表 2024年01月27日 0 点赞 0 评论 142 浏览 评分:0.0
for循环+结构体 摘要:解题思路:第一步:写结构体。第二步:判断是否是闰年一三五七八十腊是31天二月若为闰年则是29天,否则为28天其余为30天。注意事项:循环体不应该包含本月,否则会将本月全部日子加上去,应该循环结束后加上…… 题解列表 2024年01月31日 0 点赞 0 评论 138 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:先判断是闰年还是平年,闰年二月29天,平年二月28天,然后再按照月份将天数相加。注意事项:for循环的时候并不是直接月数,而是月数-1,加上输入的几号参考代码:import java.uti…… 题解列表 2024年03月17日 0 点赞 0 评论 176 浏览 评分:0.0