Advertisement
Guest User

Untitled

a guest
Feb 13th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. package lesson_2;
  2.  
  3. public class Frame_2_3_2 {
  4.  
  5. public static void main(String[] args) {
  6. getQuadrant("a", "1");
  7.  
  8. }
  9.  
  10. static String getQuadrant(String v, String h){
  11. String result = "";
  12. int indexX = Integer.valueOf(h);
  13.  
  14. if (v == "a") {
  15. System.out.println((indexX-1)*64 + "_0");
  16. } else if (v == "b"){
  17. System.out.println((indexX-1)*64 + "_" + 64);
  18. } else if (v == "c"){
  19. System.out.println((indexX-1)*64 + "_" + 64*2);
  20. } else if (v == "d"){
  21. System.out.println((indexX-1)*64 + "_" + 64*3);
  22. } else if (v == "e"){
  23. System.out.println((indexX-1)*64 + "_" + 64*4);
  24. } else if (v == "f"){
  25. System.out.println((indexX-1)*64 + "_" + 64*5);
  26. } else if (v == "g"){
  27. System.out.println((indexX-1)*64 + "_" + 64*6);
  28. } else if (v == "h"){
  29. System.out.println((indexX-1)*64 + "_" + 64*7);
  30. } else if (v == "h"){
  31. System.out.println((indexX-1)*64 + "_" + 64*8);
  32. }
  33.  
  34. return result;
  35. }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement