CCCPaste

Untitled

import java.util.Scanner;

public class Pocetok {
    public static void main(String[] args) {
      String s = new String();
      s = "XYZ";
      int x = 3;
     for(int i = 0; i < s.length(); i++) {
         int alphabet_position = (s.charAt(i) - 'A');
         int ceaser = (alphabet_position + x) % 26;
        char cipher = (char) (ceaser + 'A');
         System.out.println(s.charAt(i) + " " + cipher);
     }
    }
}