摘要: #region 3、随机排序一维数组 int[] #region 方法1 int[] oldnum = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; int[] newnum = new int[oldnum.Length]; Random ran = new Random(); List intlist = new List(); for (int i = 0; i newlist = new List(); ... 阅读全文
posted @ 2013-09-04 17:38 LifeForCodes 阅读(257) 评论(0) 推荐(0) 编辑
摘要: #region 2、用一层循环打印九九乘法口诀。 #region 方法1 for (int i = 1; i y) // continue; // Console.Write("{0}*{1}={2} ", x, y, x * y); // if (x == y) // Console.WriteLine(""); //} #endregion ... 阅读全文
posted @ 2013-09-04 17:35 LifeForCodes 阅读(289) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { #region 1、将一个整数分解质因数。 //例如:输入 //90, //打印出 //90=2*3*3*5 Console.WriteLine("请输入一个正整数(输入0结束):"); int num = int.Parse(Console.ReadLine()); int nu... 阅读全文
posted @ 2013-09-04 17:29 LifeForCodes 阅读(227) 评论(0) 推荐(0) 编辑