while循环
public class Demo05 {
public static void main(String[] args) {
int sum=0;
int T=0;
while(T<=100){
sum=sum+T;
T++;
}
System.out.println(sum);
}
}
do...while循环
public class Demo06 {
public static void main(String[] args) {
int a=8;
do {
a++;
System.out.println(a);
}while (a<0);
}
}
标签:do,String,16,int,while,循环,public
From: https://www.cnblogs.com/PedroPascal/p/17093964.html