+ 1

Hey, friends, I'm new to Java, and I had a problem, and I didn't know the solution. The problem is: 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 I wrote this code: import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input = new Scanner(System.in); int days = input.nextInt(); int hours = 24*12; int minutes = 60*24*12; int seconds = 60*60*24*12; System.out.println(seconds); } Where is the problem????

31st Dec 2021, 6:35 PM
Afnan Cherat
+ 6
You have never used the input variable "days"
31st Dec 2021, 6:37 PM
Lisa
+ 4
Read the task description again. You take days input and should calculate how many seconds these days are
31st Dec 2021, 6:42 PM
Lisa
+ 2
Thank you all 😭
31st Dec 2021, 6:58 PM
Afnan Cherat
+ 2
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner input=new Scanner(System.in); int days=input.nextInt(); int hours=24; int minutes=60*hours; int seconds=60*minutes; System.out.println(days*seconds); }
1st Jan 2022, 10:33 AM