+ 1

You need a program to convert days to seconds. The given code takes the amount of days as input. Complete the code to convert

Can anyone help me to find errors

18th May 2022, 5:35 AM
Sharon Christina
Sharon Christina - avatar
4 Answers
+ 1
I'm having an internet problem...ill post it later import java.util.Scanner; public class days { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days =12*24*60*60; System .out .println ("days"="hours"="minutes"="seconds"); int y=12; int x=24; int a=60; int b=60; long seconds = (x*y*a*b); System .out.println (seconds + "seconds"); }
18th May 2022, 5:39 AM
Sharon Christina
Sharon Christina - avatar
+ 5
Your days should accept the input and then use your math formula to print. Pay attention to what format the answer needs to be in. I don't think "seconds" on the end is required.
18th May 2022, 8:26 AM
Ausgrindtube
Ausgrindtube - avatar
+ 2
Where is your code? How to find error without code?
18th May 2022, 5:38 AM
A͢J
A͢J - avatar
+ 2
DAYS*24*60×60
19th May 2022, 1:13 AM
Arnav Gumber
Arnav Gumber - avatar