luizaspan icon

time.h library

luizaspan | PRO | 06/30/15 01:22:54 PM UTC | 0 ⭐ | 848 👁️ | Never ⏰ | []
C |

270 B

|

None

|

0 👍

/

0 👎

#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