【鼠鼠】用结构体的方法,适合小白 ``````cpp#include//#include#include#include#include#includeusingnamespacestd;structtime{intyear;intmonth;intday;};intmonth[12]={31, 题解列表 2022年04月23日 0 点赞 0 评论 570 浏览 评分:0.0
[编程入门]时间设计 摘要:解题思路:数组定义来累加注意事项:判断闰年参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c,s,z[15]={0,31,28,31,3…… 题解列表 2022年05月05日 0 点赞 0 评论 484 浏览 评分:0.0
新手结构体 希望能帮到你! 摘要:```c #include int main() { struct time { int y; int m; int d; }time; scanf("%d …… 题解列表 2022年05月05日 0 点赞 0 评论 630 浏览 评分:0.0
1049:[编程入门]结构体之时间设计 ```c#includetypedefstructYMD{intYEAR;intMON;intDAY;}YMD;intjudge_leap(YMDdata){if((data.YEAR%4==0&&data.YEAR%100!=0)||data.YEAR%400==0)return29;elseret 题解列表 2022年05月09日 0 点赞 0 评论 503 浏览 评分:0.0
编写题解 1049: [编程入门]结构体之时间设计 解题思路:好像没什么问题,但是运行还是有百分之五十不通过,望各位大佬指点。注意事项:参考代码:year,month,day=map(int,input().split())sum=0if(year%4==0andyear%100!=0)oryear%100==0:foriinrange(1, 题解列表 2022年05月22日 0 点赞 0 评论 472 浏览 评分:0.0
结构体之时间设计 摘要:解题思路:可参考注释注意事项:参考代码:#include<stdio.h> struct Date{ int year; int month; int day; };…… 题解列表 2022年05月24日 0 点赞 0 评论 600 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<stdio.h> struct tim { int y; int m; int d; }; int ispr(int…… 题解列表 2022年06月20日 0 点赞 0 评论 478 浏览 评分:0.0
第1049题,巧妙利用Switch不加break 摘要:解题思路:注意事项:闰年:能被四整除同时不被100整除,或能被400整除year%4==0&&year%100||year%400==0参考代码:#include<stdio.h>struct dat…… 题解列表 2022年07月15日 0 点赞 0 评论 683 浏览 评分:0.0
【c语言】结构体之时间设计 摘要:参考代码:#include<stdio.h>int main(){ int a,b,c; struct ymd{ int a; int b; int c; }y; scanf("%d%d%d"…… 题解列表 2022年07月21日 0 点赞 0 评论 650 浏览 评分:0.0
【C语言】结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a,b,c; struct ymd{ int a; int b; in…… 题解列表 2022年07月21日 0 点赞 0 评论 793 浏览 评分:0.0