#include <stdio.h>
#include <time.h>
#include <math.h>
#define N 1000000000
clock_t start,stop;
main()
{
int i;
double x;
start = clock();
for (i=0;i<N;i++)
x=x*3;
stop = clock();
printf("%d %f \n",N,(double) (stop-start)/(CLOCKS_PER_SEC));
}
Comments