Write a Java program that prompts the user to enter the seconds as a String (e.g., “1500500500”), converts the received value to long, and displays the number of years and days for the received seconds. For simplicity, assume a year has 365 days. Here is a sample run:

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 15VE: The result of adding, subtracting, or multiplying two integers might result in overflow but never...
icon
Related questions
Question

** in java**

Write a Java program that prompts the user to enter the seconds as a String (e.g., “1500500500”), converts the received value to long, and displays the number of years and days for the received seconds. For simplicity, assume a year has 365 days. Here is a sample run:

 

Enter the number of seconds: 1500500500
'1500500500' seconds is approximately '4' years and '2766' days
Transcribed Image Text:Enter the number of seconds: 1500500500 '1500500500' seconds is approximately '4' years and '2766' days
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage