#include <stdio.h> intmain() { int a[2][3] ={1,2,3,4,5,6}; int b[3][2]; printf("原来的数组 "); for(int i=0;i<2;i++){ for(int j=0;j<3;j++){ printf("%d ",a[i][j]); b[j][i]=a[i][j]; } printf(""); } //输出新的数组 printf("新的数组 "); for(int i=0;i<3;i++){ for(int j=0;j<2;j++){ printf("%d ",b[i][j]); } printf(""); } return 0; }
21、二维数组行列转换
免责声明:文章转载自《21、二维数组行列转换》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=