下列程序的功能是判断某一年是否为闰年.请在横线处填入适当内容,使程序能够正确运行. import java.io.*;
public class LeapYear{
public static void main(String arge[])throws IOException{ InputStreamReader ir; BufferdeReadwe in;
ir=new InputStreamReader(System.in); in=new BufferedReader(ir);
System.out.println(“输入年份是:”); String s= ( );
int year=Integer.parseInt(s);
if (year % 4 = = 0 && year % 100! = 0 // year % 400 = = 0) {
System.out.println(""+year+"年是闰年."); } else {
System.out.println(""+year+"年不是闰年.."); } } } |
|