Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
52729 杨宜炜 二维数组输出(1) C++ Accepted 1 MS 272 KB 312 2023-07-15 15:54:38

Tests(3/3):


Code:

#include<iostream> using namespace std; int main(){ int n,c=1; cin>>n; int a[n][n]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ a[i][j]=c; c++; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cout<<a[i][j]<<" "; } cout<<endl; } }