title: Number of Days Conversion in Java
body: <p>I need to use the modulo operand to convert an inputted number of days to its equivalent number of year/s, month/s, week/s, and days. We just started discussion yesterday so I'm still a bit rusty but this is the program I made:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class DaysConvert {
     public static void main(String[] args) {
      Scanner input = new Scanner(System.in);
      int noOfDays, year, month, week, days;
  
      System.out.print("Enter Number of Days: ");
      noOfDays = input.nextInt();
  
      year = noOfDays/365;
      month = year%365;
      week = month%30;
      days = week%7;
  
      System.out.println("Year: " + year);
      System.out.println("Month: " + month);
      System.out.println("Week: " + week);
      System.out.println("Day: " + days);
  }
  }
  </code></pre>
  
  <p>Is my algorithm wrong or something?</p>