var
s1:string;
function GetKey(aKey:string;aPercentouble):string;
var
i:integer;
begin
SetLength(Result,Length(aKey));
for i:=1 to Length(aKey) do
begin
Result:=Chr(Round(Ord(aKey)*aPercent));
end;
end;
function EnCode(aCryptograph,aKey:string):string;
var
i,keylen,codelen:integer;
begin
keylen:=Length(akey);
codelen:=Length(aCryptograph);
SetLength(Result, Length(aCryptograph));
for i:=1 to codelen do
begin
Result:=Chr(Ord(aCryptograph)+Ord(aKey[(i mod KeyLen)+1]));
end;
end;
function DeCode(aCryptograph,aKey:string):string;
var
i,keylen,codelen:integer;
begin
keylen:=Length(akey);
codelen:=Length(aCryptograph);
SetLength(Result, Length(aCryptograph));
for i:=1 to codelen do
begin
Result:=Chr(Ord(aCryptograph)-Ord(aKey[(i mod KeyLen)+1]));
end;
end;
begin
{ TODO -oUser -cConsole Main : Insert code here }