title: How to turn minutes into years and days?
body: <p>In the textbook it explains how to convert seconds into minutes with how many seconds remain but the question I have is as follows.</p>
  
  <blockquote>
    <p>Write a program that prompts the user to enter the minutes (e.g., 1
    billion), and displays the number of years and days for the minutes.
    For simplicity, assume a year has 365 days. Here is an example.</p>
  
  <pre>Enter the number of minutes: 100000000
  100000000 minutes is approximately 1902 years and 214 days.</pre>
  </blockquote>
  
  <p>What I currently have is as follows:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Ch2_Exercise2_7 {
    public static void main(String[] args) {
      Scanner input = new Scanner(System.in);
      // Prompt user for number of minutes
      System.out.println("Enter the number of minutes:");
      int minutes = input.nextInt();
  
       // Number of minutes in a year
      int year = minutes / 525600;
      int day = minutes / 1440;
      int remainingMinutes = day % 525600;
  
  
      System.out.println(minutes + " minutes is " + year + " years and "  +  remainingMinutes + " days ");
      }
  
     }
  </code></pre>
  
  <p>With what I have it isn't giving me the remaining minutes into days. For example, if I put in 525600 minutes it gives me 1 year and 365 days when it should just be 1 year.</p>
  
  <p>I'm using Java Eclipse. Any help would be greatly appreciated! My apologies in advance if I post the code incorrectly.</p>