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

27 lines
448 B
C

#include <stdio.h>
#include <time.h>
void compute( void );
void main()
{
time_t start_time, end_time;
start_time = time( NULL );
compute();
end_time = time( NULL );
printf( "Elapsed time: %f seconds\n",
difftime( end_time, start_time ) );
}
void compute( void )
{
int i, j;
for( i = 1; i <= 20; i++ ) {
for( j = 1; j <= 20; j++ )
printf( "%3d ", i * j );
printf( "\n" );
}
}