Computer Science, asked by payelchowdhury83, 2 months ago

wap to accept seconds and convert it into seconds minutes and hour​

Answers

Answered by himanshurajvanshi
2

Answer:

#Python Program to Convert seconds

# into hours, minutes and seconds

def convert(seconds):

seconds = seconds % (24 * 3600)

hour = seconds // 3600

seconds %= 3600

minutes = seconds // 60

seconds %= 60

return "%d:%02d:%02d" % (hour, minutes, seconds)

# Driver program

n = 12345

print(convert(n))

Explanation:

Here you can also take the input from user just by putting n=int(input("Enter the number "))

at the place of n=12345

this answer is in Python language as u have not mentioned about the language☺

mark as brainiest if u like it❤

Similar questions