Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Пузырькова сортировка
{ Пузырькова сортировка. } const n = 15; var a: array [1..n] of integer;// = (57, 75, 21, 59, 14, 38, 29, 65, 61, 35, 95, 36, 30, 59, 13, 62, 42, 88, 8, 72, 19, 32, 91, 60, 68, 31, 53, 31, 93, 52); i, j, temp, k, min: integer; begin for i := 1 to n do begin a[i] := n-i+1; // random(100); write(a[i]:2, ' '); end; writeln; for i := 1 to n do for j := 1 to n - i do if a[j] > a[j+1] then begin temp := a[j]; a[j] := a[j+1]; a[j+1] := temp; end; for i := 1 to n do write(a[i]:2, ' '); writeln; end.
run
|
edit
|
history
|
help
0
Ariketa 06
dsds
contar_divisores_de_N
yghgh
2nd tsk
nomer1
1º Questão - VS - 1º Semestre 2017
test2
practica 7 ejercicio 11
2