From: Alexandre P Francisco Date: Tue, 11 Mar 2014 18:55:34 +0000 (+0000) Subject: Adding ex5 X-Git-Url: http://web.ist.utl.pt/aplf/git/?a=commitdiff_plain;h=aa0069c70a989aee3b6ca5632ec9105344aa9216;p=iaed.git Adding ex5 --- diff --git a/aula02/ex5.c b/aula02/ex5.c new file mode 100644 index 0000000..425a13d --- /dev/null +++ b/aula02/ex5.c @@ -0,0 +1,15 @@ +#include + +#define TUNITS 60 + +int main() { + int time; + + scanf("%d", &time); + printf("%02d:%02d:%02d\n", + time/(TUNITS*TUNITS), + (time/TUNITS)%TUNITS, + time%TUNITS); + + return 0; +}