+ 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
2 Réponses
+ 3
If you want to count number of seconds based on number of days input, then do System.out.println(days * 24 * 3600);
+ 3
Check indentation for the line which is written " System.out.println"