Answer to Question #5145 in Java | JSP | JSF for Yusirah White

Question #5145
i want to change the alphabet to number, e.g. A = 0, B = 2 etc all the way to Z, this my encryption task< all i need is the code or the man line that does what i have asked. Please help
1
Expert's answer
2012-07-19T10:19:42-0400
import java.util.Scanner;

public class q5145 {
public static void
main(String args[]) {
Scanner in = new Scanner(System.in);
String
input = in.nextLine();
input = input.toLowerCase();
for (int i =
0; i < input.length(); i++)

System.out.println(Character.getNumericValue(input.charAt(i)) - 10);
}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS