作业帮 > 综合 > 作业

判断闰年的方法

来源:学生作业帮 编辑:灵鹊做题网作业帮 分类:综合作业 时间:2024/06/16 23:03:17
判断闰年的方法
判断闰年的方法
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