Answer:
<em>The program written in Java is as follows;</em>
<em>The program takes input for hours, days, weeks and months; </em>
<em>Then the inputs are converted to minutes individually and then summed up</em>
<em>For you to better understand the program, made use of comments to explain difficult lines,</em>
<em>The program is as follows</em>
import java.util.*;
public class Assignment{
public static void main(String []args){
//This line declares all variables
int hours, days, weeks, years;
Scanner input = new Scanner(System.in);
//This line prompts user for hours input
System.out.print("Hours: ");
//This line accepts input for hours
hours = input.nextInt();
//This line prompts user for days input
System.out.print("Days: ");
//This line accepts input for days
days = input.nextInt();
//This line prompts user for weeks input
System.out.print("Weeks: ");
//This line accepts input for weeks
weeks = input.nextInt();
//This line prompts user for years input
System.out.print("Years: ");
//This line accepts input for years
years = input.nextInt();
//This line converts hours to minute
int minute = 60 * hours + 1440 * days + 10080 * weeks + 525600 * years;
//This line prints the equivalent minute of user input
System.out.println(minute +" minutes");
}
}