continuebreak
2 回答
fenkapian
TA贡献18条经验 获得超1个赞
public class Help {
public static void main(String [] args) {
int ou = 0;
for(int i = 1;i <= 10;i++) {
if(i % 2 == 0) {
ou += i;
}else{
continue;
}
}
System.out.println(ou);
int zheng = 0;
for (int i = 1; i <= 10; i++) {
zheng += i;
if(zheng > 20) {
break;
}
}
System.out.println(zheng);
}
}
添加回答
举报
0/150
提交
取消