|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
lowest to highest
how would i go about arranging mixed up numbers in an array from lowest to highest. the length is set to x. so you dont know what the numbers are because the user is going to be entering the numbers
heres what i got so far its in java but the part i need should be the same as C++. public static void main(String[]args) { EasyReader IO=new EasyReader(); System.out.println("How many numbers do you want to enter?"); int length=IO.readInt(); int numbers[]=new int [length]; for(int x=0;x<length;x++) { System.out.println("please enter your "+(x+1)+"st number"); numbers[x]=IO.readInt(); } int highLow[]=highLow(numbers,length) //int median=median(); } public static int[] highlow(int[]numbers,int length) { int[]highLow=new int[length]; for(int x=0; x<length;x++) { for(int(y=0; y<length;y++) { } } } |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lowest Number | Molten | Chit-Chat | 25 | 06-04-2007 15:34 |
| Highest Score? | EricH | FIRST Lego League | 17 | 12-12-2006 00:24 |
| Lowest seed to win a regional | Cody Carey | General Forum | 12 | 02-04-2006 22:34 |
| Lowest Budget?? | Moloch | Regional Competitions | 13 | 28-03-2005 00:21 |
| HIGHEST SCORE | archiver | 2001 | 2 | 24-06-2002 02:17 |