Created
May 22, 2015 04:30
-
-
Save itsJarrett/deb5235dab5b1dcc32ad to your computer and use it in GitHub Desktop.
Corresponding Alphabetization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main implements Directions { | |
public static void main(String args[]) { | |
Scanner s = new Scanner(System.in); | |
System.out.println("Enter your 3 letter code"); | |
String code = s.nextLine(); | |
char A = code.charAt(0); | |
char B = code.charAt(1); | |
char C = code.charAt(2); | |
A = (char)('Z' - (A - 'A')); | |
B = (char)('Z' - (B - 'A')); | |
C = (char)('Z' - (C - 'A')); | |
System.out.println("Your combination is: " + A + B + C); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment