for-loop time conversion using java
<p>I'm just new in java.I am trying to convert money to time which is 1 dollar == 3 minutes but minutes-- wont let me display the exact minutes of time in the second loop</p>

<pre><code>package javaapplication8;

import java.util.Scanner;

public class JavaApplication8 {

    public static void main(String[] args) {


    /*
    1 Dollar = 3 minutes
           */  


    //I am trying to convert money to time which is 1 dollar == 3 minutes but minutes-- 
    //wont let me display the exact minutes of time in the second loop
    int minutes;
    int amount;
    int hour=0;
    int time;

    Scanner in = new Scanner(System.in);
    System.out.println("Please Enter Amount");
    amount = in.nextInt();

        time = amount * 3;

        for (minutes = time; minutes&gt;=59; minutes--)
        {
            minutes = minutes- 59;
            hour = hour+1;

            System.out.println(minutes+"minutes");
            System.out.println(hour+"hour");
         }    
    }
}
</code></pre>

<p>So if money == 40 here is the problem:</p>

<p>Please enter amount:</p>

<p>40</p>

<p>61 minutes</p>

<p>1 hour</p>

<p>here lies the problem it should be 2 minutes but because of minutes-- its not,</p>

<p>1 minutes</p>

<p>2 hour</p>