首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
请在划线处编写适当语句,完成此程序使它能正确执行。 import java.io.*; public class Leap Year{ public static void main (String arget[]) throws IOE
请在划线处编写适当语句,完成此程序使它能正确执行。 import java.io.*; public class Leap Year{ public static void main (String arget[]) throws IOE
admin
2009-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
本试题收录于:
二级Java题库NCRE全国计算机二级分类
0
二级Java
NCRE全国计算机二级
相关试题推荐
在数据管理技术发展的三个阶段中,数据共享最好的是
数据库管理系统中负责数据模式定义的语言是
在DOWHILE……ENDDO循环结构中LOOP语句的作用是
在VisualFoxPro中,有如下内存变量赋值语句:X={^2001-07-2810:15:20PM)Y=.F.M=$123.45N=123.45Z="123.24"执行上述赋值语句之后,内存变量X、Y、M、N和Z的数据类型分别是
下列选项中不属于结构化程序设计原则的是
在VisualFoxPro中,假设表单上有一选项组:〇男。⊙女,初始时该选项组的Value属性值为1。若选项按钮“女”被选中,该选项组的Value属性值是
在表单中为表格控件指定数据源的属性是
下程序段执行以后,内存变量y的值是CLEARx=12345y=0DOWHILEx>0y=y+x%10x=int(x/10)ENDDO?y
在面向对象方法中,不属于“对象”基本特点的是
随机试题
从性质上讲,教育目的是()
调节肾上腺髓质激素分泌的因素有
减少游离端义齿末端基牙所受扭力的最有效措施是
根据《医疗机构药事管理规定》,医疗机构药师的主要工作职责不包括()。
设备内作业安全要点错误的是()。
后张法在张拉预应力筋时,如设计无规定,则构件混凝土的强度应不低于设计混凝土立方体抗压强度标准值的()。
某工程划分为A、B、C、D4个施工过程,3个施工段,流水节拍均为3天,其中A与B之间间歇1天,B与C之间搭接1天,C与D之间间歇2天,则该工程计划工期应为为()。
有个地方要求处理污染问题,处理得很好。另外一个城市也提出了相关要求,但却没处理好。你怎么看?
某县法院在审理一起民事案件中,为查明案件事实,对一当事人的信件进行拆检,弄清了案情并作出了判决。下列说法中正确的是()。
根据以下资料,回答问题。2012年,全国电话用户净增11895.7万户,总数达到139030.8万户。其中,移动电话用户达到111215.5万户,在电话用户总数中所占的比重达到80.0%。2012年政企电话用户约有()万户。
最新回复
(
0
)