Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Пузырьковая сортировка массива
//fpc 3.0.0 {Пузырьковая сортировка массива} const n = 30; var a : array [1..n] of integer; var i, j, temp : integer; begin for i := 1 to n do begin a[i] := random(20); write(a[i], ' '); end; writeln; for i := 1 to n - 1 do begin 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 j := 1 to n do write(a[j], ' '); writeln; end; for i := 1 to n do write(a[i], ' '); writeln; end.
run
|
edit
|
history
|
help
0
nomer9
jose messias de oliveira 600623130
Kelipatan
Promo1
1
Shuffle number array
test26
x-div-2-x-3+1
real vs integer
Светофор-графика