+ 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
4 ответов
+ 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");
}
+ 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.
+ 2
Where is your code? How to find error without code?
+ 2
DAYS*24*60×60