Selasa, 05 Maret 2013

Contoh Program Kriptografi melalu pascal



contoh program :

program enkripsi;
uses crt;
var
a,b: string;
i,z,n:integer;
begin
clrscr;
writeln('                Algoritma Kriptografi');
writeln('');
write(' masukan nama anda : ');readln(a);


write(' Hasil Enkripsi    : ');
for i:=1 to length(a) do begin
a[i]:=chr(ord(a[i])+11);
write(a[i]);
end;
writeln;
write(' masukan nama anda : ');readln(b);
write(' Hasil Enkripsi    : ');
for z:=1 to length(b) do begin
b[z]:=chr(ord(b[z])-11);
write(b[z]);
end;
readkey;
end.

Entri Populer