Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public static int keysolver(String s) {
  2.  
  3. String temp = s;
  4. int i;
  5.  
  6. if(temp.length()>0) {
  7. for(i=0;i<temp.length();i++) {
  8.  
  9. char letter = temp.charAt(i);
  10. int distance = letter-'a';
  11.  
  12. return distance;
  13.  
  14. }
  15.  
  16. }
  17. else {
  18. return 0;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement