Convert seconds to compound duration: Difference between revisions

Content added Content deleted
(Added Befunge example.)
Line 212: Line 212:
</pre>
</pre>



=={{header|Befunge}}==
The value to convert is read from stdin, and the corresponding compound duration is written to stdout.

<lang befunge>&>:"<"%\"O{rq"**+\"<"/:"<"%\"r<|":*+*5-\v
v-7*"l~"/7\"d"\%7:/*83\+*:"xD"\%*83:/"<"<
> \:! #v_v#-#<",",#$48*#<,#<.#<>#_:"~"%,v
^_@#:$$< > .02g92p ^ ^!:/"~"<</lang>

{{out}}
<pre>7259
2 hr, 59 sec
86400
1 d
6000000
9 wk, 6 d, 10 hr, 40 min</pre>


=={{header|C}}==
=={{header|C}}==