// 1WeishuzuZhuan2Weishuzu.cpp : 定义控制台应用程序的入口点。
// xiaojun
#include "stdafx.h"
#include <stdlib.h>
#include <math.h>
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int oneDegree[] = {11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35};
int **a;
int n;
cin >> n;
a = new int *[n];
for(int i = 0; i < n; i++)
a[i] = new int[n];
int k = 0;
for(int i=0;i<n;i++)
{
for(int j=0;j<n;j++)
{
a[i][j] = oneDegree[k];
k++;
}
}
//输出
for(int i1 = 0; i1 < n; i1++)
for(int i2 = 0; i2 < n; i2++)
cout <<a[i1][i2] <<endl;
system("pause");
return 0;
}
估计你的说我折腾了,
哎,我只想到这个折腾的办法。