文件名称:do-while循环-java资源课程
文件大小:665KB
文件格式:PPT
更新时间:2024-05-16 03:16:04
java
do-while循环 do { // body of loop ... } while (condition); public class SampleDowhile { public static void main(String[] args) { int sum = 0, i = 100; do { i++; sum += i; } while (i < 200); System.out.println("the sum is " + sum); } }