- 17

Make a program to convert days to seconds

I don't know to start from very new to coding

26th Nov 2020, 10:59 AM
Ofori Handy
Ofori Handy - avatar
3 ответов
+ 7
1 day = 24 hours 1 hour = 60 minutes 1 minute = 60 seconds That's all the math you need.
26th Nov 2020, 11:05 AM
Avinesh
Avinesh - avatar
- 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 int hours = days * 24; int minutes = hours * 60; int seconds = minutes * 60; System.out.print(seconds); }
4th Apr 2021, 8:10 AM
Brian Silah
Brian Silah - avatar
- 5
This is what program
29th Nov 2020, 3:36 PM
Otaboy Rakhmonov
Otaboy Rakhmonov - avatar