+ 1

Please Help!

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); System.out.println(days*24/60/60); } } I'm a beginner in Java. Please find my mistake

25th Nov 2020, 3:40 PM
Shoxnurbek Muhiddinov
Shoxnurbek Muhiddinov - avatar
2 ответов
+ 3
If you want to count number of seconds based on number of days input, then do System.out.println(days * 24 * 3600);
25th Nov 2020, 11:33 PM
Ipang
+ 3
Check indentation for the line which is written " System.out.println"
25th Nov 2020, 3:44 PM
Steve Sajeev
Steve Sajeev - avatar