当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 把一个int数组的数字从小到大排列(C#)

ASP.NET
Web服务器控件:LinkButton控件
Web服务器控件:ListBox控件
Web服务器控件:ListItem控件
Web服务器控件:Literal控件
Web服务器控件:Panel控件
Web服务器控件:PlaceHolder控件
Web服务器控件:RadioButton控件
Web服务器控件:RadioButtonList控件
Web服务器控件:BulletedList控件
Web服务器控件:Style控件
Web服务器控件:Table控件
Web服务器控件:TableCell控件
Web服务器控件:TableRow控件
Web服务器控件:TextBox控件
Web服务器控件:XML控件
Validation服务器控件:CompareValidator控件
Validation服务器控件:CustomValidator控件
Validation服务器控件:RangeValidator控件
Validation服务器控件:RegularExpressionValidator控件
Validation服务器控件:RequiredFieldValidator控件

ASP.NET 中的 把一个int数组的数字从小到大排列(C#)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 158 ::
收藏到网摘: n/a


using System;
namespace ConsoleApplication1{ /// /// Class1 的摘要说明。 /// class Class1 { /// /// 应用程序的主入口点。 /// [STAThread] static void Main(string[] args) { MinToMax mtm= new MinToMax(); int [] array = {1,2,6,3,8,3,4,0,5,23,52,12,234,235,1232,21,234,123,143,1368}; int[] last=mtm.MTM(array); int n=0; for(int i=0;i System.Console.ReadLine(); // // TODO: 在此处添加代码以启动应用程序 // } }
public class MinToMax { public int[] MTM(int [] array)
{ int[] FianlMTM= new int[array.Length]; for(int j=0;j } FianlMTM[array.Length-(j+1)]=last;
} return FianlMTM; } }}