0

Urgent help

Can someone show me the code for this question please help me on this question i am new to this thank you in advance please 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

8th Nov 2021, 6:54 AM
Makseem
Makseem - avatar
4 Answers
+ 4
Get the number of days as input and convert it to seconds and output it. To convert it to hours, multiply it by 24, hours to minutes->multiply by 60, then minutes to seconds->multiply by 60. After completing it's like below. You should do it yourself, but as it's urgent, I'll giving you the implementation of my concept. Otherwise this is not acceptable https://code.sololearn.com/cxiOmaSs35be/?ref=app
8th Nov 2021, 7:01 AM
Rishi
Rishi - avatar
+ 3
The day contains 24 hours The hour contains 60 minutes The minute contains 60 seconds To calculate the number of seconds of a particular number of days We consider the number of days = n So The seconds of that number of days equal n*24*60*60 Example: If n= 12 The output 12*24*60*60=1036800
8th Nov 2021, 6:59 AM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 2
Post your code here
8th Nov 2021, 6:57 AM
Atul [Inactive]
+ 1
I dont know how to do it
8th Nov 2021, 6:58 AM
Makseem
Makseem - avatar