Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function encdec(str){
- var out1=str;
- if(str=="A"){
- out1='11';
- document.writeln(out1);
- }
- if(str=="B"){
- out1='1423';
- document.writeln(out1);
- }
- if(str=="C"){
- out1='234';
- document.writeln(out1);
- }
- if(str=="D"){
- out1='111';
- document.writeln(out1);
- }
- if(str=="E"){
- out1='23';
- document.writeln(out1);
- }
- if(str=="F"){
- out1='1114'
- document.writeln(out1);
- }
- if(str=="G"){
- out1='1142'
- document.writeln(out1);
- }
- if(str=="H"){
- out1='231'
- document.writeln(out1);
- }
- if(str=="I"){
- out1='2'
- document.writeln(out1);
- return;
- }
- if(str=="J"){
- out1='2231'
- document.writeln(out1);
- return;
- }
- if(str=="K"){
- out1='1434'
- document.writeln(out1);
- return;
- }
- if(str=="L"){
- out1='114'
- document.writeln(out1);
- return;
- }
- if(str=="M"){
- out1='2314'
- document.writeln(out1);
- return;
- }
- if(str=="N"){
- out1='22'
- document.writeln(out1);
- return;
- }
- if(str=="O"){
- out1='14'
- document.writeln(out1);
- return;
- }
- if(str=="P"){
- out1='2343'
- document.writeln(out1);
- return;
- }
- if(str=="Q"){
- out1='2342'
- document.writeln(out1);
- return;
- }
- if(str=="R"){
- out1='142'
- document.writeln(out1);
- return;
- }
- if(str=="S"){
- out1='143'
- document.writeln(out1);
- return;
- }
- if(str=="T"){
- out1='1'
- document.writeln(out1);
- return;
- }
- if(str=="U"){
- out1='223'
- document.writeln(out1);
- return;
- }
- if(str=="V"){
- out1='2311'
- document.writeln(out1);
- return;
- }
- if(str=="W"){
- out1='2234'
- document.writeln(out1);
- return;
- }
- if(str=="X"){
- out1='1431'
- document.writeln(out1);
- return;
- }
- if(str=="Y"){
- out1='222'
- document.writeln(out1);
- return;
- }
- if(str=="Z"){
- out1='1111'
- document.writeln(out1);
- return;
- }
- if(str=="11"){
- out1='A';
- document.writeln(out1);
- }
- if(str=="1423"){
- out1='B';
- document.writeln(out1);
- }
- if(str=="234"){
- out1='C';
- document.writeln(out1);
- }
- if(str=="111"){
- out1='D';
- document.writeln(out1);
- }
- if(str=="23"){
- out1='E';
- document.writeln(out1);
- }
- if(str=="1114"){
- out1='F'
- document.writeln(out1);
- }
- if(str=="1142"){
- out1='G'
- document.writeln(out1);
- }
- if(str=="231"){
- out1='H'
- document.writeln(out1);
- }
- if(str=="2"){
- out1='I'
- document.writeln(out1);
- return;
- }
- if(str=="2231"){
- out1='J'
- document.writeln(out1);
- return;
- }
- if(str=="1434"){
- out1='K'
- document.writeln(out1);
- return;
- }
- if(str=="114"){
- out1='L'
- document.writeln(out1);
- return;
- }
- if(str=="2314"){
- out1='M'
- document.writeln(out1);
- return;
- }
- if(str=="22"){
- out1='N'
- document.writeln(out1);
- return;
- }
- if(str=="14"){
- out1='O'
- document.writeln(out1);
- return;
- }
- if(str=="2343"){
- out1='P'
- document.writeln(out1);
- return;
- }
- if(str=="2342"){
- out1='Q'
- document.writeln(out1);
- return;
- }
- if(str=="142"){
- out1='R'
- document.writeln(out1);
- return;
- }
- if(str=="143"){
- out1='S'
- document.writeln(out1);
- return;
- }
- if(str=="1"){
- out1='T'
- document.writeln(out1);
- return;
- }
- if(str=="233"){
- out1='U'
- document.writeln(out1);
- return;
- }
- if(str=="2311"){
- out1='V'
- document.writeln(out1);
- return;
- }
- if(str=="2234"){
- out1='W'
- document.writeln(out1);
- return;
- }
- if(str=="1431"){
- out1='X'
- document.writeln(out1);
- return;
- }
- if(str=="222"){
- out1='Y'
- document.writeln(out1);
- return;
- }
- if(str=="1111"){
- out1='Z'
- document.writeln(out1);
- return;
- }
- }
- encdec("1111");//From Morse
- encdec("B");//To Morse
- encdec("C");
- encdec("D");
- encdec("E");
- encdec("F");
- encdec("G");
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement