Array
Using System;
Namespace ConsoleApplication1
{
<summary>
Summary description of the CLASS1.
</summary>
Class Class1
{
<summary>
The main entry point for the application.
</summary>
[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<array. length;i++)
{
System.Console.Write (last[i]+ "<");
++n;
}
System.Console.WriteLine ("\ n Total {0} digits", n);
System.Console.ReadLine ();
//
TODO: Add code here to start the application
//
}
}
public class Mintomax
{
Public int[] MTM (int [] array)
{
Int[] fianlmtm= new Int[array. Length];
for (int j=0;j<array. length;j++)
{
int last=0;
for (int i=1;i<array. length-j;i++)
{
int t = array[i];
if ((Array[i]) < (Array[i-1])
{
ARRAY[I]=ARRAY[I-1];
Last=array[i];
array[i-1]=t;
}
Else
Last=array[i];
}
Fianlmtm[array. length-(j+1)]=last;
}
return FIANLMTM;
}
}
}