Computer Science, asked by um87946, 6 months ago

Write an algorithm and draw a flowchart for a program that take input value as seconds from user then convert
these seconds into number of days, hours, minutes and seconds.

Answers

Answered by dabhang14
0

Answer:

Number of days = ⌊ n / (24 * 3600) ⌋

Number of Hours = ⌊ (n % (24 * 3600)) / 3600 ⌋

Number of Minutes = ⌊ (n % (24 * 3600 * 3600)) / 60 ⌋

Number of Seconds = ⌊ (n % (24 * 3600 * 3600 * 60)) / 60 ⌋

Similar questions