a015.
矩陣的翻轉
| From: [61.230.199.180] |
發表日期
:
2014-11-27 16:01
#include "stdio.h"
#include "stdlib.h"
#include<iostream>
using namespace std;
int main()
{
int m,n;
scanf("%d%d",&m,&n);
int string[m][n];
for (int i = 0; i < m; ++i)
{
for (int j = 0; j < n; ++j)
{
scanf("%d",&string[i][j]);
}
}
for (int i = 0; i < n; ++i)
{
for (int j = 0; j < m; ++j)
{
printf("%d ",string[j][i]);
}
printf("\n");
}
system("pause");
return 0;
}