parentesi fritte sono gustose Signed-off-by: Francesco Mancuso <hello@francescomancuso.it>
This commit is contained in:
@@ -7,7 +7,7 @@ public class Caesar {
|
||||
|
||||
for(int i = 0; i < plaintext.length(); i++){
|
||||
if (encoded[i] == ' ') continue;
|
||||
encoded[i] = alphabet.charAt(alphabet.indexOf(encoded[i]) + key % 26);
|
||||
encoded[i] = alphabet.charAt((alphabet.indexOf(encoded[i]) + key) % 26);
|
||||
}
|
||||
return String.valueOf(encoded);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user