63 838
Assignments Done
99,2%
Successfully Done
In August 2018

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
Expert's answer
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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions