By using sc class | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 3

By using sc class

You need a program to convert days to seconds. The given code takes the amount of days as input. Complete the code to convert it to seconds and output the result. Sample Input: 12 Sample Output: 1036800

25th Oct 2021, 7:34 PM
Sanskriti Sen
5 Answers
+ 1
System.out.println(days*24*60*60); https://code.sololearn.com/c2z59c96hq55
25th Oct 2021, 8:39 PM
SoloProg
SoloProg - avatar
+ 3
Sanskriti Sen Please before asking solution show your attempts and avoid to dislike comments unnecessary otherwise you may have been report.
25th Oct 2021, 9:03 PM
A͢J
A͢J - avatar
0
1 day = 24 hours 1 hour = 60 minutes 1 minute = 60 seconds Now take days as input and convert in seconds
25th Oct 2021, 7:40 PM
A͢J
A͢J - avatar
0
Adding to AJ: you will need to multiply *
25th Oct 2021, 8:07 PM
Abdulaziz Al-Shehhi
Abdulaziz Al-Shehhi - avatar
0
SoloProg Don't provide direct solution.
25th Oct 2021, 9:02 PM
A͢J
A͢J - avatar