int i = 0; //初始化条件
while (i<100){ //条件判断
i++; //迭代
System.out.println(i); //循环体 内容
}
int a = 0;
int sum = 0;
while (a<=100){
sum = sum + a;
a++;
}
System.out.println(sum);
12-11
1万+
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)