public class Test8 {
/*
输出1-100累加和
*/
public static void main(String[] args) {
int sum = 0;
for (int i = 0; i <= 100; i+=1){
sum += i;
}
System.out.println("sum ="+sum);
}
}
public class Test8 {
/*
输出1-100累加和
*/
public static void main(String[] args) {
int sum = 0;
for (int i = 0; i <= 100; i+=1){
sum += i;
}
System.out.println("sum ="+sum);
}
}