public class For01{
public static void main(String[] args){
int j = 0;
int sum = 0;
for(int i = 9; i <= 100 ; i += 9){
System.out.println(i);
sum +=i;
j++;
}
System.out.println("个数是:" + j);
System.out.println("总和是:" + sum);
}
}
chapter05 for01.java
于 2024-07-04 18:04:54 首次发布