A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

下列程序的功能是判断某一年是否为闰年.请在横线处填入适当内容,使程序能够正确运行.  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+"年不是闰年..");  }  }  }

1 个回复

倒序浏览
横线在哪  没看到:P
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马