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
Stack Code Pascal (Balik Kalimat)
Asalamualaikum wr. wb.
Ok sob kali ini saya akan membagikan sebuah source code pascal balik kalimat menggunakan Stack..
========================================================================
Program Balik_Kalimat_Stack;
uses wincrt;
const elemen = 255; {batas maksimun karakter}
type typearray = string[elemen];
typeStack = record
isi : typearray;
atas : 0..elemen;
end;
var
t : typeStack;
i : integer;
kalimat : typearray;
procedure buatStack(var t : typeStack);
begin
t.atas := 0;
end;
procedure push(var t : typeStack; x : char);
begin
t.atas := t.atas + 1;
t.isi[t.atas] := x;
end;
function pop(var t : typeStack): char;
begin
pop := t.isi[t.atas];
t.atas := t.atas-1;
end;
begin
buatStack(t);
writeln('tumpukan untuk membalik kalimat');
writeln('---------------------------------------------');
writeln;
write('isi kalimat : '); readln(kalimat);
writeln;
writeln('kalimat asli : '); writeln(kalimat);
writeln;
writeln('setelah dibalik');
for i := 1 to length(kalimat) do
push(t, kalimat[i]);
for i := 1 to length(kalimat) do
write(pop(t));
readln;
end.
========================================================================
OUTPUT
========================================================================
List Source Code Pascal :
->> Bubble Sort Pascal : https://tinyurl.com/w6kok5b
->> Selection Sort Pascal : https://tinyurl.com/tlt3j98
========================================================================
Komentar
Posting Komentar