[编程入门]结构体之时间设计-题解(C语言代码) 摘要:# 模块化的思想 代码很容易,但要养成一个习惯,形成一种方法不容易,希望我的这种模块化的思想能帮助大家。 ```c #include //定义一个结构体变量(包括年、月、日)。计算该日在本…… 题解列表 2020年05月06日 0 点赞 0 评论 899 浏览 评分:8.0
[每天努力一点]结构体之时间设计-题解(C代码) 摘要:1.先判断如何区分平年和闰年 闰年的判断 能被**400**整除 或者 被**4**整除且不能被**100**整除 2.从1开始输入月份到目标月份,这里判断一下i的值,如果不等于所输入的月份…… 题解列表 2020年05月10日 0 点赞 1 评论 766 浏览 评分:8.0
[编程入门]结构体之时间设计-题解(c语言代码)附解 思路简单 摘要:#include<stdio.h> struct days{//定义结构体 int year; int month; int day; }p1; int main(){ sca…… 题解列表 2024年11月24日 4 点赞 0 评论 733 浏览 评分:8.0
[编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ struct years { ; int year; i…… 题解列表 2022年09月19日 0 点赞 0 评论 290 浏览 评分:8.7
[编程入门]结构体之时间设计-题解(C语言代码)这个代码真的很棒!勿喷!!! 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main (){ int a[12]={31,28,31,30,31,30,31,31,30,31,30,31}; int b…… 题解列表 2020年11月23日 0 点赞 3 评论 511 浏览 评分:8.9
C语言程序设计教程(第三版)课后习题11.1 (C语言描述 超级简单的方法,适合于入门) 摘要:解题思路:主要用到的是数组,也可以用switch语句,会显得更有逼格哦判断闰年的条件四年一闰,百年不闰,四百年再闰润年2月有29天,平年2月有28天如果是闰年,在天数上加1就是了建立一个数组,分别是 …… 题解列表 2018年11月16日 1 点赞 0 评论 1438 浏览 评分:9.0
C语言程序设计教程(第三版)课后习题11.1 (C语言代码) 摘要:解题思路: 注意事项: 参考代码: #include struct day { int year; int month; int day…… 题解列表 2019年01月03日 4 点赞 3 评论 729 浏览 评分:9.0
[编程入门]结构体之时间设计-题解(C语言代码) 摘要:没有用结构体,没有声明函数 #include #include int main() { int y,m,d,i,all=0,t=0; scanf("%d%d%d",…… 题解列表 2019年08月15日 0 点赞 1 评论 534 浏览 评分:9.0
[编程入门]结构体之时间设计-题解(Python代码) 摘要: 分闰年和平年两种情况,我采用字典来存放每个月的天数。 首先输入年月日 用sum来存取天数 闰年的时候二月29天,因此二月的字典中2对应值为29 进入if语句后,先遍历求m月份之前的天…… 题解列表 2019年11月26日 0 点赞 2 评论 657 浏览 评分:9.0
[编程入门]结构体之时间设计-题解(C语言代码) 摘要: ```c #include int days(struct datetime); struct datetime //结…… 题解列表 2020年03月07日 0 点赞 0 评论 495 浏览 评分:9.0