- 13

Time converter

How to make this program time converter help me. Exp:12 days are 12*24=288 hours,which are 288*60=17280 minutes,which are 17280*60=1036800 seconds. Plz answer.

10th Dec 2020, 8:32 PM
Shan Khan
Shan Khan - avatar
6 Answers
+ 2
import java.util.Scanner; public class DayToSecondsConversion { public static void main(String[] args) { long days; Scanner in = new Scanner(System.in); System.out.println("Please enter days:"); days = in.nextLong(); long seconds = days * 24 * 60 * 60; System.out.println(seconds + " Seconds"); } }
10th Dec 2020, 8:38 PM
Milind Ghag
Milind Ghag - avatar
0
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 int hours = days*24; int minute = hours*60; int seconds = minute*60; System.out.println (seconds); } } May this help you
9th Mar 2021, 2:15 AM
Rahfi
Rahfi - avatar
0
import java.util.Scanner; public class DayToSecondsConversion { public static void main(String[] args) { long days; Scanner in = new Scanner(System.in); System.out.println("Please enter days:"); days = in.nextLong(); long seconds = days * 24 * 60 * 60; System.out.println(seconds + " Seconds"); } }
18th Mar 2021, 6:39 AM
Vijayanathan Menakan
Vijayanathan Menakan - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); int d =2; int h = d*24; int m = h*60; int s = m*60; System.out.println(s); } }
7th Apr 2021, 10:01 AM
vren sdv
vren sdv - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); int prod = days * 24; int prod1 = prod * 60; int prod2 = prod1 * 60; System.out.println(prod2); } }
7th May 2021, 4:39 AM
nathon c
nathon c - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); int prod = days * 24; int prod1 = prod * 60; int prod2 = prod1 * 60; System.out.println(prod2); } } Good Luck
19th Dec 2021, 9:43 AM
Muhammad Alif Deva Rizqon
Muhammad Alif Deva Rizqon - avatar