0

Please guys i am stuck at the time converter question. I have tried my best i didn't get it.

You need a 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

3rd Feb 2022, 9:25 AM
Sorefunmi Aina-Badejo
2 Respuestas
+ 2
I'm coming from Javascript World const days=12; let secs=days*86400; // 1 day = 86400 seconds console.log(secs);
3rd Feb 2022, 9:40 AM
Jasy Fabiano
Jasy Fabiano - avatar
+ 2
Hi Sorefunmi Aina-Badejo, Here is my solution, but please tell us, where you're stuck. import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); //your code goes here int seconds; seconds = days * 86400; System.out.println(seconds); } }
3rd Feb 2022, 3:11 PM
Ralf Schoenian
Ralf Schoenian - avatar