package test;
public class test {
public static void main(String[] args) {
int all = 0;
for(int i =1;i<101;i++) {
all+=i;
}
System.out.println(all);
}
}
输出结果:
package test;
public class test {
public static void main(String[] args) {
int all = 0;
for(int i =1;i<101;i++) {
all+=i;
}
System.out.println(all);
}
}
输出结果:
>