1039: [编程入门]宏定义之闰年判断
摘要:解题思路:注意事项:参考代码:n = int(input())
if n%100 != 0:
if n%4 ==0:
print('L')
el……
C++代码宏定义闰年判断
摘要:解题思路:四年一闰;百年不闰,四百年再闰if ((y%4==0) and (y%100!=0) or (y%400==0)) cout<<'L'<<endl;else cout<<&#……
宏定义之闰年判断-C语言
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define LEAP_YEAR(y) y=n%400int main(){ int n,y; scanf("%d",……
利用宏定义来解题,闰年判断
摘要:解题思路:闰年的条件,是年份能被400整除或者4整除且不能被100整除 这个应该是唯一需要注意的点注意事项:此处注意宏是可以利用函数调用的参考代码:#include<stdio.h>#define ……
什么是宏?反正这样可以
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main () { int a; scanf("%d",&a); if(a%4==0&&a%100!=0||……
1039 我不太喜欢按照规矩来
摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include<math.h>#define LEAP_YEAR(y) y%4==0&&y%100!=0||y%400==0int ……
1039: [编程入门]宏定义之闰年判断-题解(python代码)
摘要:解题思路:注意事项:参考代码:a = int(input())if a%400 == 0 or (a%4 == 0 and a%100 != 0): print('L')else……
1039: [编程入门]宏定义之闰年判断
摘要:#include<iostream>using namespace std;bool isleap(int n){ if((n % 4 == 0 && n % 100 != 0) || n % 400……