Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  asdf
Language: JAVA
Code:
public class Y6t38rDg {

        String[][] table_data = { 

                        { "0", "1", "2", "3", "4", "5", "6", "7" },

                        { "8", "9", "10", "11", "12", "13", "14", "15" },

                        { "16", "17", "18", "19", "20", "21", "22", "23" },

                        { "24", "25", "26", "27", "28", "29", "30", "31" },

                        { "32", "33", "34", "35", "36", "37", "38", "39" },

                        { "40", "41", "42", "43", "44", "45", "46", "47" },

                        { "48", "49", "50", "51", "52", "53", "54", "55" },

                        { "56", "57", "58", "59", "60", "61", "62", "63" }

                        };

        String[][] table_buffer = new String[table_data.length][table_data[0].length];

        String[] table_title = { "0", "1", "2", "3", "4", "5", "6", "7" };

public static void main(String[] args) {
zis_crypt.td_l_set(table_data.length - 1);
zis_crypt.s_r(table_data, table_buffer);
for (int i = 0; i < table_data.length; i++) {

                        for (int j = 0; j < table_data[0].length; j++) {

                                System.out.println(table_data[i][j]+"; ");

                        }
System.out.println();

                }             
        }
}

public class zis_crypt {

        

        static int td_l = 0;



        public static void td_l_set(int in) {

                td_l = in;

        }



        // --------------- s = Spalte --------------- //



        public static void s_r(String[][] table_data, String[][] table_buffer) {

                for (int i = 0; i < table_data.length; i++) {

                        for (int j = 0, k = 1; j < table_data[0].length; j++, k++) {

                                if (k > td_l) {

                                        k = 0;

                                }

                                table_buffer[i][k] = table_data[i][j];

                        }

                }

                for (int i = 0; i < table_data.length; i++) {

                        for (int j = 0; j < table_data[0].length; j++) {

                                table_data[i][j] = table_buffer[i][j];

                        }

                }

        }



        public static void s_l(String[][] table_data, String[][] table_buffer) {

                for (int i = 0; i < table_data.length; i++) {

                        for (int j = 0, k = 0; j < table_data[0].length; j++, k--) {

                                k = j - 1;

                                if (k < 0) {

                                        k = td_l;

                                }

                                table_buffer[i][k] = table_data[i][j];

                        }

                }

                for (int i = 0; i < table_data.length; i++) {

                        for (int j = 0; j < table_data[0].length; j++) {

                                table_data[i][j] = table_buffer[i][j];

                        }

                }

        }



        public static void s_u(String[][] table_data, String[][] table_buffer, int x) {

                for (int i = 0, k = 1; i < table_data.length; i++, k++) {

                        if (k > td_l) {

                                k = 0;

                        }

                        table_buffer[k][x] = table_data[i][x];

                }

                for (int i = 0; i < table_data.length; i++) {

                        table_data[i][x] = table_buffer[i][x];

                }

        }



        public static void s_o(String[][] table_data, String[][] table_buffer, int x) {

                for (int i = 0, k = 0; i < table_data.length; i++, k--) {

                        k = i - 1;

                        if (k < 0) {

                                k = td_l;

                        }

                        table_buffer[k][x] = table_data[i][x];

                }

                for (int i = 0; i < table_data.length; i++) {

                        table_data[i][x] = table_buffer[i][x];

                }

        }



        // --------------- r = Reihe --------------- //



        public static void r_u(String[][] table_data, String[][] table_buffer) {

                for (int i = 0, k = 1; i < table_data.length; i++, k++) {

                        if (k > td_l) {

                                k = 0;

                        }

                        for (int j = 0; j < table_data[0].length; j++) {

                                table_buffer[k][j] = table_data[i][j];

                        }

                }

                for (int i = 0; i < table_data.length; i++) {

                        for (int j = 0; j < table_data[0].length; j++) {

                                table_data[i][j] = table_buffer[i][j];

                        }

                }

        }



        public static void r_o(String[][] table_data, String[][] table_buffer) {

                for (int i = 0, k = 0; i < table_data.length; i++, k++) {

                        k = i - 1;

                        if (k < 0) {

                                k = td_l;

                        }

                        for (int j = 0; j < table_data[0].length; j++) {

                                table_buffer[k][j] = table_data[i][j];

                        }

                }

                for (int i = 0; i < table_data.length; i++) {

                        for (int j = 0; j < table_data[0].length; j++) {

                                table_data[i][j] = table_buffer[i][j];

                        }

                }

        }



        public static void r_l(String[][] table_data, String[][] table_buffer, int x) {

                for (int i = 0, k = 0; i < table_data.length; i++, k--) {

                        k = i - 1;

                        if (k < 0) {

                                k = td_l;

                        }

                        table_buffer[x][k] = table_data[x][i];

                }

                for (int i = 0; i < table_data.length; i++) {

                        table_data[x][i] = table_buffer[x][i];

                }

        }



        public static void r_r(String[][] table_data, String[][] table_buffer, int x) {

                for (int i = 0, k = 1; i < table_data.length; i++, k++) {

                        if (k > td_l) {

                                k = 0;

                        }

                        table_buffer[x][k] = table_data[x][i];

                }

                for (int i = 0; i < table_data.length; i++) {

                        table_data[x][i] = table_buffer[x][i];

                }

        }



}

Comments: