03
Sep
09

Program Palindrom menggunakan bahasa Pascal

Palindrom

program palindrom;
uses wincrt;
var kt,huruf,huruf1:string;
i,j : integer;
begin
writeln(‘Write a word : ‘);readln(kt);
writeln;
j:=length(kt);
huruf:=”;
for i:=1 to j do
huruf:=huruf + kt[i];
for i:=j downto 1 do
huruf1:=huruf1 + kt[i];
writeln(‘Origin Word: ‘,huruf);
writeln(‘the reverse side : ‘,huruf1);
writeln;
if (huruf=huruf1) then
writeln(‘this word included in Palindrom’)
else
writeln(‘this word not included in Palindrom’);
end.

0 Responses to “Program Palindrom menggunakan bahasa Pascal”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: