The program below is the answer to Liang’s Introduction to Java Programming (9th Edition) Chapter 2 Exercise 2.7.

Question: (Find the number of years) 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.

The above program was done using Java’s GUI. The same code without using GUI is written below:

Click here to see other solutions to Introduction to Java Programming.

Write A Comment