1 //输入n个手机号,做抽奖活动
2
3 //Console.Write("您需要输入的手机号个数是:");
4 //int a = int.Parse(Console.ReadLine());
5 //string [] shuzu=new string [a];
6 //for (int i = 0; i < a; i++)
7 //{
8 // Console.Write("请输入第"+(i+1)+"个手机号:");
9 // shuzu[i] = Console.ReadLine();
10 //}
11 //Console.WriteLine("所有号码输入完毕,请按回车键滚屏");
12 //Console.ReadLine();
13 //Random b = new Random();
14 //for (int i = 0; i < 50; i++)
15 //{
16 // int aa = b.Next(a);
17 // Console.Clear();
18 // Console.WriteLine(shuzu[aa]);
19 // System.Threading.Thread.Sleep(100);
20
21 //}
22 //Console.ReadLine();
23
24 ////int j = 0;
25 ////for (; ; )
26 ////{
27 //// int aa = b.Next(a);
28 //// Console.Clear();
29 //// Console.WriteLine(shuzu[aa]);
30 //// System.Threading.Thread.Sleep(100);
31 //// if (j == 49)
32 //// {
33 //// //console.clear();
34 //// //Console.WriteLine("想要的号码");、、、作弊
35 //// break;
36 //// }
37 //// j++;
38 ////}
39 ////Console.ReadLine();
40
41
42
43 //冒泡排序
44 //foreach(int a in shuzu)//遍历数组
45 //{
46 //Console.WriteLine(a);
47 //}
48 //object//所有类的基类 可以接受任何数据类型
49
50
51
52
53 //输入人数,输入每个人的成绩
54 //需要最高分、最低分
55 //去掉两个最高分,去掉两个最低分,求平均分
56 //for (; ; )
57 //{
58 // Console.Write("请输入人数:");
59 // int a = int.Parse(Console.ReadLine());
60 // double b;
61 // double c=0;
62 // if (a >= 5)
63 // {
64 // double[] shuzu = new double[a];
65 // for (int i = 0; i < a; i++)
66 // {
67 // Console.Write("请输入第" + (i + 1) + "个人的分数:");
68 // shuzu[i] = double.Parse(Console.ReadLine());
69 // }
70 // for (int j = 0; j < a; j++)
71 // {
72 // for (int k = j; k < (a - 1); k++)
73 // {
74 // if (shuzu[j] > shuzu[k + 1])
75 // {
76 // b = shuzu[k + 1];
77 // shuzu[k + 1] = shuzu[j];
78 // shuzu[j] = b;
79 // }
80
81 // }
82 // c+=shuzu[j];
83 // }
84 // //for (int l = 0; l < a; l++)
85 // //{
86 // // Console.WriteLine(shuzu[l]);
87 // //}
88 // Console.WriteLine("最高分是:"+shuzu[a - 1]);
89 // Console.WriteLine("最低分是:"+shuzu[0]);
90 // Console.WriteLine("平均分是:"+(c-shuzu[0]-shuzu[1]-shuzu[a-1]-shuzu[a-2])/(a-4));
91
92 // break;
93 // }
94 // else
95 // {
96 // Console.WriteLine("您输入的人数必须大于等于5!");
97 // }
98 //}
99 //Console.ReadLine();