22智能在线
新记
C#定义一个数组,并输出最大值和最小值
如题所述
举报该文章
相关建议 2011-09-16
int[] a = new[] { 4, 7, 6, 9, 3, 1, 5, 8, 0 };
List<int> b = new List<int>(a);
b.Sort(delegate(int x, int y) { return (y - x); });
æ大å¼ï¼b[0]
æå°å¼ï¼b[b.Count-1]
温馨提示:内容为网友见解,仅供参考
当前网址:
https://22.t2y.org/zz/0ct6xh0s0.html
其他看法
无其他回答
相似回答
大家正在搜
相关问题
C#输入数组,输出最大值,最小值
用C#编写,定义一个元素个数不确定的数组,对数组进行排序,并...
c#计算并输出一维数组中的最大值、最小值和平均值
c#定义一个4*4的二维数组,要求输出数组,并求出主对角线上...
用C#找出数组中的最大值和最小值
C#定义一个数组,共10个元素,找到其中的最大值和最小值,及...
C语言:求一组数组最大值及最小值的下标。
(1) 定义一个元素个数不确定的数组,对数组进行排序,并求数...