这个实现了1-9的循环显示输出,挺巧的一个方法。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace P2._2
{
class Program
{
static void Main(string[] args)
{
int x = 0;
while (true)
{
x = (x + 1) % 10;
Console.WriteLine(“the Value of x is {0}”,x);
}
Console.ReadLine();
}
}
}