fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3. #include <math.h>
  4. #include <inttypes.h>
  5. int main(void) {
  6. // your code goes here
  7. float age = 219600;
  8. const float_t seconds = fmodf(age, 60);
  9. const uint32_t minutes = ((uint32_t)(age / 60)) % 60;
  10. const uint32_t hours = (uint32_t)(age / 3600);
  11. printf("%02" PRIu32 ":%02" PRIu32 ":%06.3f ago", hours, minutes, seconds);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
61:00:00.000 ago