看看这个啥问题啊
public class HelloWorld {
public static void main(String[] args) {
int sum=0;
for(int a = 1; (a<=100)&&(a%3!=0);a++ ){
sum=sum+a;
}
System.out.println(sum);
}
}
输出结果是3
public class HelloWorld {
public static void main(String[] args) {
int sum=0;
for(int a = 1; (a<=100)&&(a%3!=0);a++ ){
sum=sum+a;
}
System.out.println(sum);
}
}
输出结果是3
2019-08-02
举报