Advertisement
deyanmalinov

04. Caesar Cipher

Mar 25th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. package DPM;
  2.  
  3. import java.util.*;
  4.  
  5. public class Main {
  6.     public static void main(String[] args) {
  7.         Scanner scan = new Scanner(System.in);
  8.         String line = scan.nextLine();
  9.         for (int i = 0; i < line.length(); i++) {
  10.             char ch = (char) (line.charAt(i)+3);
  11.             System.out.print(ch);
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement