+ 1
Time convert
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner s = new Scanner(System.in); Int D = 2; Int h = 24; Int m = 60; Int S = 60; Int DaySecond = D*h*m*S; System.out.println(DaySecond); //your code goes here } } Line 0 cannot find symbol, any help?
2 ответов
+ 2
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int days = s.nextInt();
int h = 24;
int m = 60;
int S = 60;
int DaySecond = days*h*m*S;
System.out.println(DaySecond);
//your code goes here
}
}
//so, an error was writing every "int" with "I", an error was at the scanner.nextInt, i replaced scanner with s, and deleted int D, i think this is the result you wanted.
//You may want to use other data types such as double or float instead of int. i was curious and tried 0.5 days and got an error.