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
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!
Learn more about our help with Assignments:
JavaJSPJSF