[编程入门]时间设计 摘要:解题思路:数组定义来累加注意事项:判断闰年参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c,s,z[15]={0,31,28,31,3…… 题解列表 2022年05月05日 0 点赞 0 评论 174 浏览 评分:0.0
[编程入门]结构体之时间设计-题解(C++代码-类的基础运用:构造函数,析构函数,this指针) 摘要: #include using namespace std; class date { public: int year; in…… 题解列表 2020年10月20日 0 点赞 0 评论 453 浏览 评分:0.0
[编程入门]结构体之时间设计-题解(C++代码) 摘要:#include<iostream> using namespace std; struct time { int year , month , date; }a; int jug…… 题解列表 2020年12月14日 0 点赞 0 评论 496 浏览 评分:0.0
[编程入门]结构体之时间设计-题解(C++代码) 摘要:解题思路:思路都一样,不过记录重复天数有花活玩 1)就用数组 2)用switch语句减少空间存储。 注意事项:**12个月记天数是先记前11个月的天数在加上这个月的天数。** **判断闰年 4…… 题解列表 2021年02月04日 0 点赞 0 评论 209 浏览 评分:0.0
结构体之时间设计 摘要:解题思路: 整体不算难。定义一个结构体,输入年、月、日;然后判断其是否是闰年,随后相加用户输入的月份减一的总天数,最后再加上用户输入的第几天,即完成。注意事项: 一定要注意闰年的判断方式:…… 题解列表 2021年03月06日 0 点赞 0 评论 266 浏览 评分:0.0
日期的计算 摘要:解题思路:利用类进行处理;注意事项:平年、闰年的判断。参考代码:#include<iostream> class Time { private:int year, month, day; p…… 题解列表 2021年04月10日 0 点赞 0 评论 151 浏览 评分:0.0
[编程入门]结构体之时间设计(C++实现)含解题思路 摘要:解题思路分为4步: 1. 定义装有年月日的结构体 2. 定义判断是否为闰年的函数 3. 定义每个月天数的查询表 4. 定义主函数计算天数 ```cpp #include #inclu…… 题解列表 2022年01月25日 0 点赞 0 评论 203 浏览 评分:0.0
编写题解 1049: [编程入门]结构体之时间设计 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;struct date{ int year; int month; int …… 题解列表 2022年03月13日 0 点赞 0 评论 215 浏览 评分:0.0
C语言程序设计教程(第三版)课后习题11.1 (C++代码) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int n,y,r,i; cin>>n>>y>>r; switch(…… 题解列表 2017年11月16日 0 点赞 0 评论 925 浏览 评分:0.0
1049-结构体之时间设计 摘要:解题思路:注意事项:参考代码:/*天数问题:1、3、5、7、8、10、12月:31天4、6、9、11月:30天2月:非闰年有28天,闰年有29天 闰年特点:1) 4的倍数,不是100的倍数2) 400…… 题解列表 2022年10月06日 0 点赞 0 评论 156 浏览 评分:0.0