题解 3009: 判断闰年

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

筛选

判断闰年(基本法)

摘要:解题思路:首先要知道闰年是什么,闰年就是可以被4整除但是不能被100整除,或者能被400整除的年份。注意事项:注意这里是||,而不是&&参考代码:#include<stdio.h>//闰年就是可以被4……

编写题解 3009: 判断闰年

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    int a;    cin>>a;    if((a……

不懂可评论

摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main{     public static void main(String[] a……

不懂可评论

摘要:解题思路:注意事项:参考代码:year=int(input()) if((year%4==0)and(year%100!=0)or(year%400==0)):     print("Y") e……

3009: 判断闰年

摘要:解题思路:闰年两种判定方法:要么能被4整除且不能被100整除,或者能被400整除可得参考代码:#include<iostream> using namespace std; int main() ……

编写题解 3009: 判断闰年

摘要:解题思路:注意事项:参考代码:a=int(input())if (a%4==0)&(a%100!=0):    print(&#39;Y&#39;)elif (a%400==0):    print(……

C语言判断闰年

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){     int year,flag=0;     scanf("%d",&year);     if(year%……

水题目,只需一个bool

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;bool is_leap(int y){ return y%4 == 0 && y % 100……

判断闰年(c语言)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){     int x;     scanf("%d",&x);     if(x%4==0 && x%100!=0……

3009: 判断闰年

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){   int a;   cin>>a;   if(a%4==0&&a%1……