class Ascending2
{
public static void main (String [] args)
{
int n[];
n = new int[5];
n[0]=9;
n[1]=5;
n[2]=11;
n[3]=5;
n[4]=8;
for (int i=0; i<5; i++)
System.out.println(n[i]);
}
}
Sorting an Array (Ascending Order)Need help with sorting an array into ascending order
Page 1 of 1
1 Replies - 2158 Views - Last Post: 21 May 2009 - 09:44 AM
#1
Sorting an Array (Ascending Order)
Posted 21 May 2009 - 08:33 AM
Hi, I need help in being able to sort this array. I'd like to sort it in ascending order.
Replies To: Sorting an Array (Ascending Order)
#2
Re: Sorting an Array (Ascending Order)
Posted 21 May 2009 - 09:44 AM
You need to apply a sorting algorithm to this array like selection, insertion, bubble or quick sort. If you have any issues in implementation then only we can help you.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|