SyntaxFix
Write A Post
Hire A Developer
Questions
char letter; for(int i=0; i<text.length(); i++) { letter = text.charAt(i); if(letter>='A' && letter<='Z') System.out.println((int)letter - 'A'+1); if(letter>='a' && letter<= 'z') System.out.println((int)letter - 'a'+1); }