题解 1049: [编程入门]结构体之时间设计

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

1049: [编程入门]结构体之时间设计

摘要:解题思路:1. 判断闰年:根据闰年规则(能被 4 整除但不能被 100 整除,或能被 400 整除)编写函数,确定年份是否为闰年,以调整 2 月天数。2. 设定每月天数:创建数组存储非闰年……

简单易懂的写法

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct year_month_day{ ……

结构体之时间设计

摘要:解题思路:注意事项:注意7,8月份都是31天参考代码:#include <stdio.h>int pdrn(int year);struct fal{ int y……

自己做的新手,欢迎指导

摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct date{    int year;    int month;    int day;};int mod(int y,i……

新手必看最简思路

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int xx(int n,int y){ int day=0,a=0; if(n%400==0||(n%4==0&&n%100!=0……