摘要:
为了尽快完成面试,第一反应就是想到先创建数组,然后随机产生1-100的数字,再与数组进行比较,数组中没有此数字时进行比较,虽然这种方法不好,但能够实现功能。示例代码如下:static void Main(string[] args){int[] num = new int[100];List<int> temp = new List<int>();Random rand = new Random();int number = 0;for (int index = 0; index < num.Length; index++){ do { //随机产生1-100的数 阅读全文
posted @ 2011-06-16 20:28
衡斅
阅读(1389)
评论(8)
推荐(0)

浙公网安备 33010602011771号