Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Arrays;
- public class Crypto {
- public static void main(String[] args) {
- int index = 0;
- int fIndex = 0;
- char found;
- char[] ca = {' ','!','"','#','$','%','&','\'','(',')',
- '*','+',',','-','.','/','0','1','2','3','4','5',
- '6','7','8','9',':',';','<','=','>','_','@',
- 'A', 'B', 'C', 'D', 'E', 'F','G','H','I','J',
- 'K','L','M','N','O','P','Q','R','S','T','U',
- 'V','W','X','Y','Z','[','\\',']','^','_'};
- char[][] input = { {'L','T','>','E','O','Q','W','S','T',
- 'G','V','C','H','E'},
- {'X','X','3','3','E','2','3','X',
- 'W','I','I','X','E','X' } };
- char [][] output = new char[2][14];
- for(int i=0; i<2; i++) {
- for (int j=0; j<input[0].length; j++) {
- System.out.print(input[i][j]);
- //System.out.print(Arrays.toString(input));
- }
- System.out.println();
- }
- for(int i=0; i<2; i++) {
- for (int j=0; j<input[i].length; j++) {
- //System.out.println(input[i][j]);
- for(int c=0; c < ca.length; c++) {
- if (input[i][j] == ca[c]){
- fIndex = c-4;
- output[i][j] = ca[fIndex];
- System.out.print(output[i][j]);
- }
- }
- }
- System.out.println();
- }
- //System.out.println(num);
- // TODO Auto-generated method stub
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement