♥
http://www.facebook.com/monica.cayaba
follow me on twitter :D
http://twitter.com/MonicaCayaba
package sortingalgorithm;
import java.io.*;
public class SortingAlgorithm {
public static void main(String[] args)throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
int i,choice,sortOpt;
int arraySize;
System.out.println("Enter the size of the array: ");
arraySize=Integer.parseInt(in.readLine());
int number[] = new int[arraySize];
System.out.println("Enter the values in array:");
for(i=0;i<number.length;i++){
number[i]=Integer.parseInt(in.readLine());
}
System.out.println("What manner of sorting do you like?" + "\n[1] Ascending" + "\n[2] Descending
We’ve updated our privacy policy so that we are compliant with changing global privacy regulations and to provide you with insight into the limited ways in which we use your data.
You can read the details below. By accepting, you agree to the updated privacy policy.