请在划线处编写适当语句,完成此程序使它能正确执行。 import java.io.*; public class Leap Year{ public static void main (String arget[]) throws IOE

admin2009-02-15  26

问题 请在划线处编写适当语句,完成此程序使它能正确执行。
   import java.io.*;
   public class Leap Year{
   public static void main (String arget[]) throws IOException{
   InputStreamReader ir;
   BufferedReader in;
   ir=new Input Stream Reader (System.in);
   in=new BufferedReader(ir);
   System.out.println(“输入年份是:”):
   String s=in.readLine();
   int year=Integer.parseInt(s);
   {
   System.out.println(" "+ year+“年是闰年。”);
   }
   else
   {
   System.out.println(" " +year+“年不是闰年。”);
   }
   }
   }

选项

答案if(year% 4==0 && year % 100!=0||year%400=0)

解析
转载请注明原文地址:https://jikaoti.com/ti/Htb0FFFM
0

最新回复(0)