摘要: 产生一个int数组,长度为100,并向其中随机插入1-100,并且不能重复。(两种方法) 1, List<int> myList = new List<int>(); Random ran = new Random(); while (myList.Count<100) { int num = ra 阅读全文
posted @ 2016-10-23 22:43 路边有一棵草 阅读(585) 评论(0) 推荐(0) 编辑
摘要: 一个数组:1,1,2,3,5,8,13,21...+m; static void Main(string[] args) { Console.Write("输入想求的斐波那契数列项数:"); int n = Convert.ToInt32(Console.ReadLine()); //递归实现 Co 阅读全文
posted @ 2016-10-23 22:42 路边有一棵草 阅读(227) 评论(0) 推荐(0) 编辑
摘要: var xmlHttp; function createHttp() { try { xmlHttp = new XMLHttpRequest(); } catch (e) { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } } createH 阅读全文
posted @ 2016-10-23 22:40 路边有一棵草 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 咱们呢先定义一个数组 int[] list = {5,8,3,4,6,7}; 首先冒泡排序的的要求是这个数组中的从大到小排列,或者从小到大排列。 for (int i = 0; i < list.Length; i++) { for (int j = i+1; j < list.Length; j+ 阅读全文
posted @ 2016-10-23 22:40 路边有一棵草 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 下面是一个由*号组成的4行倒三角形图案。要求:1、输入倒三角形的行数,行数的取值3-21之间,对于非法的行数,要求抛出提示“非法行数!”;2、在屏幕上打印这个指定了行数的倒三角形。 ******* ***** *** * aa: Console.Clear(); Console.WriteLine( 阅读全文
posted @ 2016-10-23 22:39 路边有一棵草 阅读(761) 评论(0) 推荐(0) 编辑