判断闰年的方法
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/14 00:54:26
判断闰年的方法
import java.util.*;
public class RunNian {
/*
* Determine whether a leap year
*/
public static void main(String[] args)
{
int year;
String another = "y";
Scanner scan= new Scanner(System.in);
while (another.equalsIgnoreCase("y"))
{
System.out.println("please enter a year!");
year = scan.nextInt();
if(yea
public class RunNian {
/*
* Determine whether a leap year
*/
public static void main(String[] args)
{
int year;
String another = "y";
Scanner scan= new Scanner(System.in);
while (another.equalsIgnoreCase("y"))
{
System.out.println("please enter a year!");
year = scan.nextInt();
if(yea