enum week { Mon, Tue, Thre, Wend, Fir, Jan, Sun, } static void Main(string[] args) { week myweek = week.Mon; int myweek1=(int)myweek ; Console.WriteLine(myweek);//输出Mon Console.WriteLine(myweek1);//输出0 } Read More
static void Main(string[] args) { Console.WriteLine("请输入一个数a:");int a = Int32.Parse(Console.ReadLine());Console.WriteLine("请输入一个数b:");int b = Int32.Parse(Console.ReadLine());//第一种方法使用临时变量来实现两个数交换//int temp;//temp = a;//a = b;//b = temp;//第二种方法 不使用临时变量 使用两个数的和 实现两个数交换//a += b;//b Read More