View Single Post
  #3   Spotlight this post!  
Unread 18-06-2007, 21:14
notaPINKtruck's Avatar
notaPINKtruck notaPINKtruck is offline
Registered User
AKA: Ryan Julian
FRC #0233 (The Pink Team)
Team Role: Alumni
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Berkeley, CA
Posts: 73
notaPINKtruck is a splendid one to beholdnotaPINKtruck is a splendid one to beholdnotaPINKtruck is a splendid one to beholdnotaPINKtruck is a splendid one to beholdnotaPINKtruck is a splendid one to beholdnotaPINKtruck is a splendid one to beholdnotaPINKtruck is a splendid one to behold
Send a message via AIM to notaPINKtruck
Re: lowest to highest

Java libs do this for you.

Code:
import java.util.Arrays;
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();
  }
  
  Arrays.sort(numbers);
  
  //int median=median();
}
http://java.sun.com/j2se/1.4.2/docs/...il/Arrays.html
__________________

Rockledge HS/Cocoa Beach HS & NASA Kennedy Space Center
Team 233: "The PINK Team"



Last edited by notaPINKtruck : 18-06-2007 at 21:18.