Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Сортировка массиа прямым выбором
{Сортировка массива прямым выбором} const n = 30000; var a : array [1..n] of integer; var i, j, temp, min_index : integer; begin temp := 0; randomize; for i := 1 to n do begin a[i] := random(20); // write(a[i]:3); end; writeln('массив сформирован'); for i := 1 to n-1 do begin min_index := i; for j := i + 1 to n do if a[j] < a[min_index] then min_index := j; temp := a[i]; a[i] := a[min_index]; a[min_index] := temp; end; // for i := 1 to n do // write(a[i]:3); writeln('сортировка завершена'); end.
run
|
edit
|
history
|
help
0
janja - naloga 2 - 11.7.2013
Project Euler 20 - Factorial digit sum
Calculatrice 1.0
zadacha5
8
Сумма пар чисел кратных и некратных 11
Fast program
practica 7 ejercicio 1
Menezes
IT101 - W4_1