This is a code for sorting the ascending order.Altough i had this code, but i don't really know the concept for this code and how does this code work actually......
for (int count = findings.Length - 1; count > 0; count--)
{
for (int countInner = 0; countInner < count; countInner++)
{
if (findings[countInner + 1] <= findings[countInner])
{
temp = findings[countInner];
findings[countInner] = findings[countInner +1];
findings[countInner +1] = temp;
}
}
}
for (int count = 0; count < findings.Length; count++)
{
Console.Write("{0}\t", findings[count]);
}
Can anyone explain to me????
probelm with this code!(c#)
Feb 17 2006, 04:35 PM, updated 20y ago
Quote
0.0132sec
1.03
5 queries
GZIP Disabled