simple bill generator app in android

I am trying to develop an app that will take two user input one is totalAmount and amountEntered as input and will show the minimum number of notes or coins i have define prior, these are double[] prices = new double[]{1, 0.5, 0.25, 0.10, 0.05, 0.02, 0.01}; if user buys 2.50's items and entered a 5 bucks note than it will show like 2notes*1, 0.5coin*1 as change. I have done like this but not getting the desired output.

 public void countCurrency(int amount) {
    int[] noteCounter = new int[7];
     int [] notes =  {1, 5, 25, 10, 05, 02, 01};


    // count notes using Greedy approach
    for (int i = 0; i < 6; i++) {
        if (amount >= notes[i]) {
            noteCounter[i] = amount / notes[i];
            amount = amount - noteCounter[i] * notes[i];
        }
    }

    for (int i = 0; i < 6; i++) {
        if (noteCounter[i] != 0) {
            textViewBillMemo.append(notes[i] +":" +noteCounter[i]);

        }
    }
}