Professional Documents
Culture Documents
4 1
4 1
h>
#include<time.h>
int main(){
clock_t start= clock();
int x,y;
int n=500000; //lmite superior del rango
int arr[ n ];
for ( x = 2; x <= n; x++ )
if ( arr[ x ] != 0 ) //S el nmero es primo
for(x=2;x<=n;x++)
if(arr[x]!=0)
printf("%d,",x);
printf("Tiempo transcurrido: %f", ((double)clock() - start) /CLOCKS_PER_SEC);
return 0;