我沒注意,改成這樣,居然也運(yùn)行通過。????
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int x = 1;
? ? ? ? ? ? do
? ? ? ? ? ? {
? ? ? ? ? ? ? ? x++;
? ? ? ? ? ? ? ? Console.Write(x+" ");
? ? ? ? ? ? }
? ? ? ? ? ? while(x>=2&&x<=4);
? ? ? ? }
? ? }
}
2020-02-03
沒毛病啊, 初始化X是1,循環(huán)一次,X就登2,while判斷的時候, 符合條件,然后再去循環(huán)· 這個沒問題,X打印出來應(yīng)該是3吧