This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/ldiv.c

19 lines
349 B
C

#include <stdio.h>
#include <stdlib.h>
void print_time( long int ticks )
{
ldiv_t sec_ticks;
ldiv_t min_sec;
sec_ticks = ldiv( ticks, 100L );
min_sec = ldiv( sec_ticks.quot, 60L );
printf( "It took %ld minutes and %ld seconds\n",
min_sec.quot, min_sec.rem );
}
void main()
{
print_time( 86712L );
}