SHARE
TWEET

Untitled

a guest Jul 19th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Decipherer {
  2.  
  3.    
  4.    
  5.    public static void main(String[] args) {
  6.        String message1 = "0@sn9sirppa@#?ia'jgtvryko1";
  7.        String message2 = "q8e?wsellecif@#?sel@#?setuotpazdsy0*b9+mw@x1vj";
  8.        String message3 = "aopi?sedohtém@#?sedhtmg+p9l!";
  9.        
  10.        System.out.println(Dechiffrer(message1));
  11.        System.out.println(Dechiffrer(message2));
  12.        System.out.println(Dechiffrer(message3));
  13.     }
  14.    
  15.  
  16.    private static String Dechiffrer (String message) {
  17.        int chiffreCle = message.length()/2;
  18.        String presqueDechiffré1 = message.substring(5,chiffreCle+5);
  19.        String presqueDechiffré2 = presqueDechiffré1.replace("@#?"," ");
  20.        String dechiffre = new StringBuilder(presqueDechiffré2).reverse().toString();
  21.        
  22.        return dechiffre ;
  23.    }
  24.  
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top