“`”

答:

<pre><code>int [] array = new int [*] ;
int temp = 0 ;
for (int i = 0 ; i < array.Length – 1 ; i++)
{
for (int j = i + 1 ; j < array.Length ; j++)
{
if (array[j] < array[i])
{
temp = array[i] ;
array[i] = array[j] ;
array[j] = temp ;
}
}
}
</code></pre>

 

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.