public class ch10_10
{
    public static void main(String[] args)
    {
        double accounts[] = 
            {365.55, 789.19, 532.11, 1079.96, 185.19};
        double sum = 0;

        for (int loopIndex = 0; loopIndex < accounts.length; 
            loopIndex++) {
            sum += accounts[loopIndex];
        }

        System.out.println("The total in all accounts is $" + sum);
    }
}
