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

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

筛选

简单的结构体定义

摘要:解题思路:定义一个结构体判断平年还是闰年取值输出即可注意事项:函数内一定加struct参考代码:#include<stdio.h>struct shijian//定义一个结构体{    int yea……

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

摘要:解题思路:先判断平闰年,并用数组列出该年每月天数,遍历前几个月的天数求和后加上输入的几号即为结果。注意事项:参考代码:#include<stdio.h>struct dijitian{    int ……

思路挺清晰的,值得一看

摘要:解题思路:注意事项:参考代码://结构体之时间设计//定义一个结构体变量(包括年、月、日)。//计算该日在本年中是第几天,注意闰年问题。#include <stdio.h>struct date { ……

[编程入门]时间设计

摘要:解题思路:数组定义来累加注意事项:判断闰年参考代码:#include<bits/stdc++.h>using namespace std;int a,b,c,s,z[15]={0,31,28,31,3……

结构体之时间设计

摘要:解题思路:可参考注释注意事项:参考代码:#include<stdio.h> struct Date{     int year;     int month;     int day; };……