- 2

How to convert days to seconds

import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); //can you guys just help me . it wants me to convert days to seconds . thank you guys. <3 } }

14th May 2022, 5:59 PM
Amirmohammad Honarvar
5 Respostas
+ 4
Amirmohammad Honarvar how many hours are in a day ? how many minutes make up one hour ? how many seconds make up one minute ? finally question is how many days are you trying to calculate ? 3 days, a week, 2 weeks, a month, 3 months ???
14th May 2022, 6:06 PM
BroFar
BroFar - avatar
+ 2
Step 1:- First you need to convert Day into hours hours = days *24; step 2:- Than convert hours into minutes minutes = hours *60; Step 3:- convert minutes into second Second = minutes *60;
14th May 2022, 6:13 PM
Raj D-Coder
Raj D-Coder - avatar
0
seconds in a day * days = seconds
14th May 2022, 6:01 PM
Raul Ramirez
Raul Ramirez - avatar
0
1 minute = 60 seconds 1 hour = 60 minutes 1 day = 24 hours ∴ Lets say for 3 days, the time converted in seconds will be as follows - 60 * 60 * 24 * 3 = 259,200 seconds (seconds) (minutes) (hours) (days)
14th May 2022, 9:41 PM
Debasmita Majumder
Debasmita Majumder - avatar
0
first have multiply number of days to hours in one day then multiply number of hours to minutes in one hour then multiply number of second in one minute then answer will come for example Day=1 In one day Hours=24 minutes= in one hour=60 So , in 24 hours minutes=60 × 24 = 1440 in one minute second=60 So , in 1440 minutes seconds =1440×60 =86400 So ,in one second=86400. is anewer
16th May 2022, 1:29 AM
Piyush Singh