Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TFUtama.BitBtn3Click(Sender: TObject);
- var i, j : Byte;
- begin
- if Edit1.Text <> '' then Begin
- Edit6.Clear;
- Memo2.Clear;
- //Teknik Substitusi dengan Key : 14
- i:=0;
- for i := i to Length(Edit1.Text) do begin //pengulangan hingga Max karakter di Edit 1
- j:=0;
- for j := j to 12 do begin //A - M (Pengulangan Plain Text)
- if MidStr(Edit1.Text,(1+i),1)=Chr(65+j) then begin
- Edit6.Text := Edit6.Text + Chr(78+j);
- end //end if
- end; //end for j
- for j := 13 to 25 do begin //N - Z (Pengulangan Plain Text)
- if MidStr(Edit1.Text,(1+i),1)=Chr(65+j) then begin
- Edit6.Text := Edit6.Text + Chr(65+i);
- end //end if
- end; //end for j
- if MidStr(Edit1.Text,(1+i),1)=#32 then begin
- Edit6.Text := Edit6.Text + ' ';
- end //end if
- end; //end for i
- Memo2.Text:=Edit6.Text;
- Memo2.Hint:=Memo2.Text;
- End // end If <>
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement