数组行列这么从键盘输入规定
数组的行列这么从键盘输入规定#include <stdio.h>
int main(int argc, char const *argv[])
{
int row = 0, col = 0;
scanf("%d%d", &row, &col);
int arr;
for(size_t i = 0; i < row; i++)
{
for(size_t j = 0; j < col; j++ )
{
scanf("%d", &arr);
}
}
for(size_t i = 0; i < row; i++)
{
for(size_t j = 0; j < col; j++ )
{
printf("%d", arr);
}
printf("\n");
}
return 0;
}
--------------------------------------------------------------
Microsoft Windows [版本 10.0.18363.476]
(c) 2019 Microsoft Corporation。保留所有权利。
E:\Users\admin\Documents\VScode\Code>c:\Users\admin\.vscode\extensions\ms-vscode.cpptools-0.26.1\debugAdapters\bin\WindowsDebugLauncher.exe --stdin=Microsoft-MIEngine-In-wcq3otkr.tin --stdout=Microsoft-MIEngine-Out-fymelq3q.ald --stderr=Microsoft-MIEngine-Error-mxsmydpf.4a5 --pid=Microsoft-MIEngine-Pid-4gucyoxt.lgj --dbgExe=D:\MinGW\bin\gdb.exe --interpreter=mi
3 3
1
2
3
4
5
6
7
8
9
123
456
789
页:
[1]