-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathROT11655.java
More file actions
30 lines (27 loc) · 894 Bytes
/
Copy pathROT11655.java
File metadata and controls
30 lines (27 loc) · 894 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class ROT11655 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
char[] input = br.readLine().toCharArray();
for (int i = 0; i < input.length; i++) {
if (input[i] >= 'A' && input[i] <= 'Z') {
if (input[i] < 'N') {
input[i] += 13;
} else {
input[i] -= 13;
}
} else if (input[i] >= 'a' && input[i] <= 'z') {
if (input[i] < 'n') {
input[i] += 13;
} else {
input[i] -= 13;
}
}
}
for (char x : input) {
System.out.print(x);
}
}
}