Time convert | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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?

30th Jul 2022, 8:36 AM
KrINekroN
KrINekroN - avatar
1 Answer
+ 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.
30th Jul 2022, 8:41 AM
🍇 Alex Tușinean 💜
🍇 Alex Tușinean 💜 - avatar