Advertisement
Nick-O-Rama

Unencrypter

Mar 18th, 2015
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.Scanner;
  3.  
  4. public class Unencrypter {
  5.    
  6.     public static void main(String[] args) throws IOException
  7.     {
  8.         File myFile = new File("output.txt");
  9.         Scanner input = new Scanner(myFile);
  10.         PrintWriter writer =  new PrintWriter("unencrypted.txt");
  11.         while (input.hasNext())
  12.         {
  13.             String line = input.nextLine();
  14.             char[] unencrypt = line.toCharArray();
  15.             for (int i = 0; i < unencrypt.length; i++)
  16.             {
  17.                 unencrypt[i] -= 10;
  18.                 writer.print(unencrypt[i]);
  19.             }
  20.             writer.println();
  21.         }
  22.         writer.close();
  23.     }
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement