Valintalajitteluohjelma
printf("Number of items = ");
if (n > nmax) {printf("Number too large. Try again: ");
printf("Generating %d random numbers in the range
for (i = 1; i <= n; i++) A[i] = rand();
printf("Beginning selection sort of %d items\n", n);
t0 = ((float) clock())/((float) CLOCKS_PER_SEC);
t1 = ((float) clock())/((float) CLOCKS_PER_SEC);
printf("Done. Time = %.2f seconds.\n", t1-t0);
printf("Number of items = ");