View difference between Paste ID: RZi7C9k9 and NczwmqJi
SHOW: | | - or go back to the newest paste.
1
import java.util.Scanner;
2
3
public class Demo {
4
    public static void main(String[] args) {
5
        Scanner scanner = new Scanner(System.in);
6
        String text = scanner.nextLine();
7
        String builderEncryptedText = "";
8
9
        for (char symbol : text.toCharArray()) {
10
            //всеки един символ да го криптираме
11
            char encryptedSymbol = (char)(symbol + 3);
12
            builderEncryptedText += encryptedSymbol;
13
        }
14
15
        System.out.println(builderEncryptedText);
16
17
    }
18
19
20
}
21