1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;struct date{ int n,y,r;};int m[13]= {0…… 题解列表 2023年12月09日 0 点赞 0 评论 816 浏览 评分:0.0
1049: [编程入门]结构体之时间设计 摘要:题目解读:这道题就是给我们日期,让我们通过程序计算出该日期是这一年的第几天。解题思路及代码: 首先,我们要定义用于存储年,月,日的变量。在这里有两个方法,第一种如题目名,用定义结构体的方法…… 题解列表 2023年11月26日 0 点赞 0 评论 644 浏览 评分:9.9
1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; //定义日期结构体 struct Date { int year; …… 题解列表 2023年09月24日 0 点赞 0 评论 555 浏览 评分:9.9
优质题解 1049: [编程入门]结构体之时间设计,c++ #DOTCPP1049:**题目描述:**[DOTCPP1024:计算该日在本年中是第几天(结构体之时间设计)](http://https://www.dotcpp.com/oj/problem1049.html"DOTCPP1024:计算该日在本年中是第几天, 题解列表 2023年08月15日 0 点赞 1 评论 1118 浏览 评分:6.0
1049: [编程入门]结构体之时间设计 摘要:解题思路:题目主要要搞清楚什么是闰年,什么是平年,然后闰年每个月有多少天,平年每个月有多少天。注意事项:参考代码:#include <bits/stdc++.h> using namespace s…… 题解列表 2023年05月09日 0 点赞 0 评论 619 浏览 评分:0.0
编程入门]结构体之时间设计 想了好久 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;struct time{ int year; int month; int day;};int…… 题解列表 2023年04月05日 0 点赞 0 评论 472 浏览 评分:0.0
###[编程入门]结构体之时间设计-超easy版!! ###[编程入门]结构体之时间设计-超easy版!!主要分四步:1.创建结构体2.判断年份是否为闰年3.记录各月份的总天数4.对天数累加先看代码#includeusingnamespacestd;intmain(){structyra{intyear;intmonth;intday;};//创建结构体 题解列表 2023年04月03日 0 点赞 0 评论 588 浏览 评分:9.9
c++解题思路 ```cpp#includeusingnamespacestd;structtime{intyear;intmonth;intday;};intn;intmain(){structtimest;cin>>st.year;cin>>st.month;cin>>st.day;if(st.year%400= 题解列表 2023年03月07日 0 点赞 0 评论 585 浏览 评分:9.9
1049: [编程入门]结构体之时间设计 ```cpp#includeusingnamespacestd;structDate{intyear,mouth,day;};intIsLeapYear(Datedate){if(date.year%4==0&&date.year%100!=0||date.year%400==0){return1;} 题解列表 2023年02月24日 0 点赞 1 评论 1419 浏览 评分:9.9
1049: [编程入门]结构体之时间设计 ```cpp#includeintmonth[13]={0,31,28,31,30,31,30,31,31,30,31,30,31},i,sum=0;structtime{intyear;intm;intday;}t;intmain(){scanf("%d%d%d", 题解列表 2022年12月06日 0 点赞 0 评论 512 浏览 评分:9.9