[ create a new paste ] login | about

Link: http://codepad.org/1OmvxbOE    [ raw code | fork ]

C, pasted on Dec 1:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define N   (10000)
int Dt[N];
int Count = 0;

int main(void) {
    int i;
    int seed;
    seed = time(NULL);
    printf("seed : %d\n",seed);
    srand(seed);
    for (i=0 ; i<N ; i++) Dt[i] = (rand()>>3)%10000;
    
    /* ソート関数呼び出し位置 */
    
    for (i=0 ; i<N ; i++) {
        printf(" %4d",Dt[i]);
        if ((i%20)==19) printf("\n");
    }
    if (i%20) printf("\n");
    printf("Count %d\n",Count);
    return 0;
}


Create a new paste based on this one


Comments: