day03-循环流程--while循环

This commit is contained in:
2026-04-25 13:19:55 +08:00
parent bb85c51850
commit c0be45822e

View File

@@ -16,8 +16,15 @@ public class Demo09 {
System.out.println(i); System.out.println(i);
i++; i++;
} }
System.out.println("程序结束"); System.out.println("------------------------------");
//打印10~1 //打印10~1
int j = 10;
while (j >= 1) {
System.out.println(j);
j--;
}
System.out.println("程序结束");
} }
} }