import
java.util.Arrays;
import
java.util.Scanner;
public
class ArraySortDemo {
public static void main(String[] args) {
double amoMoney[] = new double[5];
double sumTotal = 0.0;
Scanner input = new Scanner(System.in);
for (int i = 0; i < 5; i++) {
System.out.print("please input the number " + " " + (i + 1) + " " + "amount of money: ");
amoMoney[i] = input.nextDouble();
sumTotal = sumTotal + amoMoney[i];
}
System.out.println("No." + " " + "amount of money");
for (int i = 0; i < 5; i++) {
//array sort
Arrays.sort(amoMoney);
System.out.println(i+1+ " " + amoMoney[i]);
}
System.out.println("sumtotal" + " " + sumTotal);
}
}