发布网友 发布时间:2024-10-23 18:08
共1个回答
热心网友 时间:2024-10-24 08:02
public class Test{
public static void main(String[] args){
int sum = 0;
for (int i = 1; i <= 2000; i++) {
if (i % 2 != 0)
continue;
sum += i;
}
System.out.println(sum);
}
}
热心网友 时间:2024-10-24 08:02
public class Test{
public static void main(String[] args){
int sum = 0;
for (int i = 1; i <= 2000; i++) {
if (i % 2 != 0)
continue;
sum += i;
}
System.out.println(sum);
}
}