Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.         Scanner input = new Scanner(System.in);
  5.         String choice;
  6.         char x;
  7.         Scrambler word = new Scrambler();
  8.  
  9.         System.out.println("Word to be encrypted: ");
  10.         word.input( input.next() );
  11.  
  12.         word.Encrypt();
  13.  
  14.         System.out.println(word.Retrieve());
  15.  
  16.         System.out.print("Decrypt?Y/N: ");
  17.  
  18.         choice = input.next();
  19.         x = choice.charAt(0);
  20.  
  21.         if (x == 'Y' || x == 'y'){
  22.  
  23.             System.out.println(word.Decrypt());
  24.  
  25.         }else{
  26.  
  27.             System.out.println("Thanks for encrypting!");
  28.  
  29.         }
  30.  
  31.  
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement