定义宏,判断是否为闰年 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define LEAP_YEAR(y) y%100 ==0 && y%4 ==0 && y…… 题解列表 2022年10月26日 0 点赞 0 评论 412 浏览 评分:0.0
宏定义之闰年判断 摘要: #include #include #include using namespace std; #define LEAP_YEAR(y) fun(y);…… 题解列表 2022年10月12日 0 点赞 0 评论 410 浏览 评分:0.0
题目 1039: [编程入门]宏定义之闰年判断 摘要:```cpp #include using namespace std; int main() { int a; cin >> a; if (a % 400 ==…… 题解列表 2022年08月23日 0 点赞 2 评论 512 浏览 评分:8.0
[编程入门]宏定义之闰年判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long n;int main(){ cin>>n; if(n%10…… 题解列表 2022年05月07日 0 点赞 0 评论 464 浏览 评分:0.0
宏定义之闰年判断 题解 摘要:解题思路:这题就是判断是否是闰年嘛!简单。判断方法如下:第一、y%4==0并且y%100!=0;第二、y%400==0。注意事项:无。参考代码:#include<bits/stdc++.h>#defi…… 题解列表 2022年05月06日 0 点赞 0 评论 377 浏览 评分:0.0
宏定义之闰年判断 摘要:解题思路:大家都知道判断闰年要要求%4==0,%100==0,%400==0;注意事项:L,N是大写参考代码:#include<bits/stdc++.h>using namespace std;in…… 题解列表 2022年05月06日 0 点赞 0 评论 476 浏览 评分:4.7
编写题解 1039: [编程入门]宏定义之闰年判断--解题 摘要:解题思路:注意事项:参考代码:#include <iostream> #define LEAP_YEAR(y) leap(y) //替换为该子函数 using namespace std; char …… 题解列表 2022年03月08日 0 点赞 0 评论 520 浏览 评分:0.0
1039: [编程入门]宏定义之闰年判断 摘要:解题思路:宏本质是字面值替换,把一个值换成字符串,所以出现条件判断(多个可能的输出)时只靠宏是没法输出的。所以我定义了一个判断闰年的函数,该函数一定要有返回值,即返回L或S。最后把宏定义成这个函数。在…… 题解列表 2022年03月05日 0 点赞 1 评论 1079 浏览 评分:6.0
宏定义之闰年判断 摘要:```cpp #include using namespace std; #define LEAP_YEAR(y) if((y%100!=0&&y%4==0)||y%400==0){cout…… 题解列表 2022年03月03日 0 点赞 0 评论 343 浏览 评分:0.0
编写题解 1039: [编程入门]宏定义之闰年判断 摘要:解题思路:注意事项:参考代码:#include<iostream> #define LEAP_YEAR(y) (y%4==0&&y%100!=0)||(y%100==0&&y%400==0) us…… 题解列表 2022年02月02日 0 点赞 0 评论 429 浏览 评分:0.0