//1到100求和(累加)
public class hello {
public static void main(String[]arges) {
int sum=0; for(int i=1;i<=100;i++){ sum+=i; } System.out.println("1加到100的和:"+sum);
}
}
//1到100求和(累加)
public class hello {
public static void main(String[]arges) {
int sum=0; for(int i=1;i<=100;i++){ sum+=i; } System.out.println("1加到100的和:"+sum);
}
}