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
zadacha6
test04
факторизация числа
Луноход-4
naloga 3 za janjo
kk
3
Matrix,colums with all equal elements
record as a procedure argument
virtuelna ravan-preklapanje krugova