Hallo! In diesem Code verstehe ich die Letzte zeile, bzw. die Operation die man in encrypted speichert? Was genau bedeutet (char) ? Danke!
Java:
public class test {
public static void main(String[] args) {
char input, encrypted; int distance;
// Read in the input character
input = Input.readChar();
// Read in a valid distance
do {
System.out.print("Please enter a valid number (between -10 and +10, without 0): ");
distance = Input.readInt(); }
while (distance < -10 || distance > 10 || distance == 0);
encrypted = (char) ((input + distance) % 128);
}
}