Skip to content

Commit

Permalink
1019 C
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasPLopes committed Dec 23, 2019
1 parent 4a813a6 commit 09c3303
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions C/1019.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include <stdio.h>
#include <math.h>
int main()
{
int hr = 0, mm = 0, ss = 0, x;
scanf("%i", &x);
if (x > 3600)
hr = x / 3600;
x = x - (hr * 3600);
if (x > 60)
mm = x / 60;
x = x - (mm * 60);
ss = x;

printf("%i:%i:%i\n", hr, mm, ss);
return 0;
}

0 comments on commit 09c3303

Please sign in to comment.