為什么只執(zhí)行一個循環(huán)體
public class SDF{
? public static void main(String[] args){
? int x=23;
? while(x<=50){
? ? System.out.println(x);
? ? x++;
? }
? do{
? ?System.out.println(x);
? ?x++;
? }while(x<=50);
? }
}
public class SDF{
? public static void main(String[] args){
? int x=23;
? while(x<=50){
? ? System.out.println(x);
? ? x++;
? }
? do{
? ?System.out.println(x);
? ?x++;
? }while(x<=50);
? }
}
2015-10-30
舉報
2015-10-30
應該兩個都執(zhí)行了,while循環(huán)輸出到i=50為止,i=51是do ?while 循環(huán)輸出的
2015-10-30
你寫的是什么,我看不懂 。
2015-10-30
<script type="text/javascript">document.write("hello world!!")</script>