黑马程序员技术交流社区

标题: 判断某一年是否为闰年.请在横线处填入适当内容 [打印本页]

作者: 几率收割    时间: 2015-6-24 22:14
标题: 判断某一年是否为闰年.请在横线处填入适当内容
下列程序的功能是判断某一年是否为闰年.请在横线处填入适当内容,使程序能够正确运行.  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+"年不是闰年..");  }  }  }
作者: SouthKai    时间: 2015-6-24 23:10
横线在哪  没看到:P




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2