Urgent help | Sololearn: Learn to code for FREE!

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

11/8/2021 6:54:13 AM

Makseem

4 Answers

New Answer

+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

+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

+2

Post your code here

+1

I dont know how to do it