#include <stdio.h>
int main()
{
int M[5][5] = { 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 }, N[5][5] = { 0 };
int i, j;
int k, s;
for (i = 0;i < 5;i++)
for (j = 0; j < 5;j++)
N[j][i] = M[i][j]; \\用兩個二維數組表示
for (k = 0;k < 5;k++)
for (s = 0;s < 5;s++)
{
printf("%d ", N[k][s]);
if (s == 4)
printf("\n"); \\輸出矩陣形式