Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lesson_2;
- public class Frame_2_3_2 {
- public static void main(String[] args) {
- getQuadrant("a", "1");
- }
- static String getQuadrant(String v, String h){
- String result = "";
- int indexX = Integer.valueOf(h);
- if (v == "a") {
- System.out.println((indexX-1)*64 + "_0");
- } else if (v == "b"){
- System.out.println((indexX-1)*64 + "_" + 64);
- } else if (v == "c"){
- System.out.println((indexX-1)*64 + "_" + 64*2);
- } else if (v == "d"){
- System.out.println((indexX-1)*64 + "_" + 64*3);
- } else if (v == "e"){
- System.out.println((indexX-1)*64 + "_" + 64*4);
- } else if (v == "f"){
- System.out.println((indexX-1)*64 + "_" + 64*5);
- } else if (v == "g"){
- System.out.println((indexX-1)*64 + "_" + 64*6);
- } else if (v == "h"){
- System.out.println((indexX-1)*64 + "_" + 64*7);
- } else if (v == "h"){
- System.out.println((indexX-1)*64 + "_" + 64*8);
- }
- return result;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement