這樣為什么不行
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int x = 5;//循環(huán)計數(shù)變量
? ? ? ? ? ? //行① 請?zhí)顚懹嫈?shù)變量的初始化語句
? ? ? ? ? ??
? ? ? ? ? ??
? ? ? ? ? ? while (x? <= 1)//行② 請?zhí)顚懷h(huán)條件
? ? ? ? ? ? {
? ? ? ? ? ? ? ? Console.Write("加油!");
? ? ? ? ? ? ? ? x--;//行③ 請?zhí)顚懹嫈?shù)變量的自加語句
? ? ? ? ? ? ? ??
? ? ? ? ? ? }
? ? ? ? }
? ? }
}
2020-08-05
我知道了(x? <= 1)應(yīng)改為(x? >= 1)