【鼠鼠】用结构体的方法,适合小白
摘要:``````cpp
#include
//#include
#include
#include
#include
#include
using namespace std;
str……
思路挺清晰的,值得一看
摘要:解题思路:注意事项:参考代码://结构体之时间设计//定义一个结构体变量(包括年、月、日)。//计算该日在本年中是第几天,注意闰年问题。#include <stdio.h>struct date { ……
编写题解 1049: [编程入门]结构体之时间设计
摘要:解题思路:先判断平闰年,并用数组列出该年每月天数,遍历前几个月的天数求和后加上输入的几号即为结果。注意事项:参考代码:#include<stdio.h>struct dijitian{ int ……
1049: [编程入门]结构体之时间设计
摘要:解题思路:(1)定义一个平年月份天数的数组。(2)根据for循环统一计算平年月份的天数。(3)判断输入数据年份是否是闰年,考虑输入月份是否大于2,若满足则sum加上一天。(4)加上输入数据中的day。……
[编程入门]结构体之时间设计
摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().strip().split())s=0list1=['1','3','5',&……
[编程入门]结构体之时间设计
摘要:```java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {……
编写题解 1049: [编程入门]结构体之时间设计
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;struct date{ int year; int month; int ……
1049: [编程入门]结构体之时间设计
摘要:解题思路:既然是C++,用class代替struct也是很正常的吧。计算第几天就是建一个数组存放每个月有几天,然后把前面的月的天数加起来,加上day,最后闰年+1。注意事项:好像也没啥可说的。参考代码……