REVIEW WEBSITE MEDIAKOMEN.COM || WEBSITE DAFTAR JADI BUZZER || PENGHASIL UANG VIA WEBSITE || RECEHAN REVIEW WEBSITE MEDIAKOMEN.COM || WEBSITE DAFTAR JADI BUZZER || PENGHASIL UANG VIA WEBSITE || RECEHAN REVIEW WEBSITE MEDIAKOMEN.COM || WEBSITE DAFTAR JADI BUZZER || PENGHASIL UANG VIA WEBSITE || RECEHAN REVIEW WEBSITE MEDIAKOMEN.COM || WEBSITE DAFTAR JADI BUZZER || PENGHASIL UANG VIA WEBSITE || RECEHAN #REVIEWWEBSITE #penghasiluang #receh Berikut Link Webistenya : https://www.mediakomen.com/ 0:00:00 ▼ EXPAND FOR NAVIGATION ▼ 0:01 CH 0: Opening 0:08 CH 1: Story 0:10 CH 2: Closing
Bubble Sort Code Program Pascal
Ok sob kali ini mimin akan berbagi source code program pascal nih tentang bubble sort, langsung aja sob perhatiin ya.========================================================================
Program Bubble_Sort;
uses crt;
var
i,j,k,temp,n : integer;
A,B,C : array [1..100] of integer;
begin
clrscr;
write('Banyaknya elemen array : '); readln(n);
{Input Data}
for i := 1 to n do
begin
write('Elemen ke-', i,':'); readln(A[i]);
end;
{Cetak Array Sebelum Pengurutan}
writeln;
write('Sebelum diurutkan : ');
for i := 1 to n do
write(A[i], ' ');
writeln;
writeln('Proses Pengurutan Bubble :');
for i := 1 to n-1 do
begin
for j := n downto i+1 do
begin
if A[j-1] > A[j] then
begin
temp := A[j-1];
A[j-1] := A[j];
A[j] := temp;
end;
end;
{cetak Array tiap langkah pengurutan}
writeln;
write('Hasil akhir langkah ke-', i,':');
for k := 1 to n do
write(A[k],' ');
end;
{cetak array setelah pengurutan}
writeln;
writeln;
textcolor(15);
write('hasil pengurutan Bubble : ');
for i := 1 to n do
write(A[i],' ');
readln;
end.
OUTPUT
========================================================================
Ok semoga artikel ini bermanfaat, salam Syntax_Error.
Komentar
Posting Komentar