定义宏,判断是否为闰年 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#define LEAP_YEAR(y) y%100 ==0 && y%4 ==0 && y…… 题解列表 2022年10月26日 0 点赞 0 评论 141 浏览 评分:0.0
C语言 宏定义之闰年判断& 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define LEAP_YEAR(y) if(((y%4==0)&&(y%100!=0))||(y%4…… 题解列表 2022年11月19日 0 点赞 0 评论 92 浏览 评分:0.0
1039: [编程入门]宏定义之闰年判断 摘要:解题思路:注意事项:参考代码:1.使用函数def LEAP_YEAR(y): if y % 400 == 0 or (y % 4 == 0 and y % 100 != 0): p…… 题解列表 2022年12月08日 0 点赞 0 评论 266 浏览 评分:0.0
宏定义之闰年判断 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define LEAP_YEAP(y) ((y%4==0&&y%100!=0)||(y%400==0))?L:Nint main(){…… 题解列表 2023年02月01日 0 点赞 0 评论 106 浏览 评分:0.0
编写题解 1039: 宏定义之闰年判断 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;#define LEAP_YEAR(y) if(y%4==0&&y%100!=…… 题解列表 2023年03月16日 0 点赞 0 评论 141 浏览 评分:0.0
1039题 : 宏定义之闰年判断 摘要:# 自己写代码 ```c #include #include #define LEAP_YEAR(y) ; int main() { return 0; } ``` #…… 题解列表 2023年07月03日 0 点赞 0 评论 229 浏览 评分:0.0
三目运算符闰年判断 摘要:代码:#include <stdio.h>#define LEAP_YEAR(y) (y%400 ==0 ? printf("L") : ((y%4 ==0 && y%100 != 0) ? prin…… 题解列表 2023年07月08日 0 点赞 0 评论 113 浏览 评分:0.0
宏定义之闰年判断 摘要:解题思路:在这题中使用定义宏的方法比使用定义函数的方法更简单注意事项:#define 定义常量和宏注意 #define 后面没有分号;#define 常量名 常量值#define 宏名 宏表达式参考代…… 题解列表 2023年11月05日 0 点赞 0 评论 129 浏览 评分:0.0
[编程入门]宏定义之闰年判断 def模块版 摘要:解题思路:注意事项:参考代码:def LEAP_YEAR(y): if y%400==0 or (y%4==0 and y%100!=0) : print('L')…… 题解列表 2023年11月18日 0 点赞 0 评论 153 浏览 评分:0.0