by Fabriz on Tue Feb 06, 2007 11:46 pm
Ho creato un piccolo programma per cifrare testi in chiaro tramite l'uso del metodo di Cesare:
- Code: Select all
Program criptocesare;
var txt:string[100];
i:byte;
procedure leggi;
begin
write('Introduci il testo da cifrare: ');
readln(txt);
end;
procedure cifra;
begin
for i:=1 to length(txt) do
if (ord(txt[i])<97) or (ord(txt[i])>122) then delete(txt,i,1)
else
case txt[i] of
'x': txt[i]:='a';
'y': txt[i]:='b';
'z': txt[i]:='c'
else txt[i]:=chr(ord(txt[i])+3);
end;
end;
begin
leggi;
cifra;
writeln('La stringa cifrata: ',txt);
readln
end.
Bit wrote:Ma sisi cosa? che ca**o c'è da ridere? bha
Dead on my sweet Piano.
IO NON SONO AMICO DI GOOGLE