HW2.7

时间:2021-11-23 00:08:53

HW2.7

 import java.util.Scanner;

 public class Solution
 {
     public static void main(String[] args)
     {
         Scanner input = new Scanner(System.in);

         System.out.print("Enter the number of minutes: ");
         long minutes = input.nextLong();

         input.close();

         long hours = minutes / 60;
         long days = hours / 24;
         long years = days / 365;
         long day = days % 365;

         System.out.println(minutes + " minutes is apporximately " + years + " years and " + day + " days");
     }
 }

相关文章