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:

Oracle 12c: SQL
3rd Edition
ISBN:9781305251038
Author:Joan Casteel
Publisher:Joan Casteel
Chapter10: Selected Single-row Functions
Section: Chapter Questions
Problem 5HOA
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
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
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
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L