#include #include #include #include int main (void ) { int i=0 ; int n ; clock_t t0, t1 ; double duree , x=2.8 ; printf("Resolution CLOKS_PER_SEC=%ld\n", CLOCKS_PER_SEC); printf("Combien de milliers tours ? "); scanf("%d",&n); t0 = clock(); while ( i < 1000*n ) { x = 1/sqrt(sin(x)); // un petit calcul .... i++; } t1 = clock(); duree = (double)(t1 - t0 ) / CLOCKS_PER_SEC; printf("Duree pour %d calculs = %e s\n",1000*n, duree ); return 0 ; }