0
Hi, how to make a time converter ?
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); //your code goes here } }
3 Respostas
+ 1
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);
}
}
+ 2
A day = 24 hours
1 hour = 60 minutes
1 minute = 60 seconds ; Found logic...?
+ 1
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int days = scanner.nextInt();
//your code goes here
System.out.println(days*24*60*60);
}
}