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/div.c

17 lines
279 B
C

#include <stdio.h>
#include <stdlib.h>
void print_time( int seconds )
{
auto div_t min_sec;
min_sec = div( seconds, 60 );
printf( "It took %d minutes and %d seconds\n",
min_sec.quot, min_sec.rem );
}
void main()
{
print_time( 130 );
}