赞
踩
- #include<stdio.h>
- int main()
- {
- int n = 0;
- int m = 0;
- int a = 0;
- //输入 n m
- scanf_s("%d %d", &n, &m);
- //将数据存储在arr上
- int arr[10][10] = {0};
-
- //输入 a
- for (int j = 0; j < n; j++)
- {
- for (int i = 0; i < m; i++)
- {
- scanf_s("%d", &arr[i][j]);
- }
- }
- printf("\n");
- //转置
- for (int i = 0; i < m; i++)
- {
- for (int j = 0; j < n; j++)
- {
- printf("%d ", arr[i][j]);
- }
- printf("\n");
- }
-
- return 0;
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。