首页
题库
网课
在线模考
桌面端
登录
搜标题
搜题干
搜选项
0
/ 200字
搜索
单项选择题
下列程序当输入n为4时,输出结果( )
boolean flag=false;
int n,sum=0,j=2;
n=java.util.Scanner(System.in);
if(n<2){
sum=n;
}else{
sum=1;
for (int i=2;i
if (n%i==0) {
sum =sum+i;
flag=true;
}
}
if(flag) System.out.println("sum="+sum); A.
1 B.
2 C.
3 D.
什么也不输出
点击查看答案&解析
手机看题
你可能感兴趣的试题
单项选择题
Throughout the movie, Chris wore his _____(经久耐穿的)uniform to his work place.
A. durable
B.during
C. affordable
D.edible
点击查看答案&解析
手机看题
不定项选择
为提高整个产业系统的能源效率应适当加大具有较高能源效率的行业在产业系统的百分比( )In order to improve the energy efficiency of an industrial system, the economic share of industrial sectors with higher energy efficiency should be appropriately increased()
A.正确
B.错误
点击查看答案&解析
手机看题
微信扫码免费搜题