- 2

I need a Java code program to convert days to seconds.

The given code takes the amount of days as input. Complete the code to convert it to seconds and output the result. Sample Input: 12 Sample Output: 1036800 12days * 24hrs =288hrs which 288hrs *60 minutes =17280 Which 17280 *60seconds =1,036,800 seconds

21st Dec 2021, 12:36 PM
Nature
Nature - avatar
3 Respuestas
+ 5
Nature , please do not ask the community for a ready-made code. everything you need to know is already written by you in your post. you have also finished 92% of the java tutorial. so i am sure that you can do this task by yourself. is it because you have started java 3 years ago, and can not remember all details? maybe you like to go through the tutorial and refresh your knowledge...
21st Dec 2021, 3:15 PM
Lothar
Lothar - avatar
+ 2
Nature 1 day = 24 hours 1 hour = 60 minutes 1 minute = 60 seconds So 1 day = 24 * 60 * 60 Now take this hint and solve problem
21st Dec 2021, 3:14 PM
A͢J
A͢J - avatar
+ 1
Go and search the "Code" section, that's where the codes are. The Discussion forum is not place to ask for codes.
21st Dec 2021, 2:15 PM
Ipang