com.xu.struct.DoWhileDemo01

package com.xu.struct;

public class DoWhileDemo01 {
public static void main(String[] args) {
int i=0;
int sum=0;
do {
sum=sum+i;
i++;
}while(i<=100);
System.out.println(sum);
}
}

"D:\Program Files\Java\jdk1.8.0_281\bin\java.exe" "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2021.1\lib\idea_rt.jar=63001:D:\Program Files\JetBrains\IntelliJ 
5050

Process finished with exit code 0

上一篇:com.xu.struct.BreakDemo01


下一篇:com.xu.base.Demo07