public class AddTest{
public static void main(String[] args){
int sum = 0;
for(int i=0; i<=10;i++){
sum += i;
//sum = sum+i;
}
System.out.println(sum);
}
}
for循环
最新推荐文章于 2023-02-07 20:03:09 发布
public class AddTest{
public static void main(String[] args){
int sum = 0;
for(int i=0; i<=10;i++){
sum += i;
//sum = sum+i;
}
System.out.println(sum);
}
}