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
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
Math,
2 months ago
Social Sciences,
2 months ago
English,
6 months ago
English,
11 months ago
Biology,
11 months ago