Write a java program to convert numbers into years, weeks and days

Write a java program to convert numbers into years, weeks and days. This Java program converts a given number of days to years, weeks, and days. As an input, choose any integer number. Then, to calculate the number of years, we divide the input by 365. Then we divide by 7 to get the number of weeks using the modulus operation. To get the number of days, we use modulo operation.

import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
int m, year, week, day;
Scanner s = new Scanner(System.in);
System.out.print("Enter the numbers");
m = s.nextInt();
year = m / 365;
m = m % 365;
System.out.println("No of years"+year);
week = m / 7;
m = m % 7;
System.out.println("No of weeks:"+week);
day = m;
System.out.println("No of days:"+day);
}
}

Enter the numbers567
No of years1
No of weeks:28
No of days:6