这样写为什么不对?新手求指教
public class HelloWorld {
public static void main(String args[]) {
int i = 0;
int sum = 0;
for (;(i <= 100) && (i % 3 != 0);) {
sum = sum + i;
i = i++;
System.out.println(sum);
}
}
}
public class HelloWorld {
public static void main(String args[]) {
int i = 0;
int sum = 0;
for (;(i <= 100) && (i % 3 != 0);) {
sum = sum + i;
i = i++;
System.out.println(sum);
}
}
}
2017-12-27
举报