一道java编程题:有一矩阵:a b c d e f g h i j k l m n o p q r 转变成:a g m b h n c i o d j p
问题描述:
一道java编程题:有一矩阵:a b c d e f g h i j k l m n o p q r 转变成:a g m b h n c i o d j p
答
public class T1 {public static void main(String[] args) {char a[][] = {{'a','b','c','d','e','f'},{'g','h','i','j','k','l'},{'m','n','o','p','q','r'}}; char b[][] = new char[3][4];for(int i=0;i...呵呵,不好意思,我要的效果是:agmbhnciodj p这类型的。。。可能上面没写清楚,因为格式显示不出来!!public class T1 { public static void main(String[] args) {char a[][] = {{'a','b','c','d','e','f'},{'g','h','i','j','k','l'},{'m','n','o','p','q','r'}}; char b[][] = new char[3][4]; for(int j = 0; j