Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
[English] Vignere Cipher (All letters, numbers and signs)
program VignereCipher; const Starttext='Informatic is fun (1+2=3), right?'; Keyword='KEY'; var i,ASCIICode,numb,Push:integer; Endtext:string; begin Endtext:=''; numb:=1; for i:=1 to length(Starttext) do begin ASCIICode:=ord(Starttext[i]); Push:=ord(Keyword[numb])-65; if (ASCIICode)<=ord('Z') then if (ASCIICode = ord(' ')) XOR ((ASCIICode <= 64) AND (ASCIICode >= 40)) then begin Endtext:=Endtext+chr(ASCIICode); numb:=numb-1; end else begin if (ASCIICode+Push)>ord('Z') then Endtext:=Endtext+chr(ASCIICode+Push-26) else Endtext:=Endtext+chr(ASCIICode+Push); end else begin if (ASCIICode+Push)>ord('z') then Endtext:=Endtext+chr(ASCIICode+Push-26) else Endtext:=Endtext+chr(ASCIICode+Push); end; numb:=numb+1; if numb>length(Keyword) then numb:=1; end; write(Endtext); end.
run
|
edit
|
history
|
help
1
Please
log in
to post a comment.
1
Enkripsi
C:\Users\skava\Documents\Паскаль
1 25 5
Find Nash Equilibrium
1
Promo1
4º Questão VS - 1º Sem. 2017
AreaTriangulo.pas
Задачи на div и mod
stackse - search stackoverflow differently
Please log in to post a comment.