杨辉三角是程序语言设计中很经典的题目 也是学习程序设计的人 都要解决的问题
这里提供一种利用二维数组 打印出杨辉三角的思路
class YHSJ
{
public static void main(String[] args)
{
//用数组打印杨辉三角
int len=8;//定义杨辉三角的规模
int size=2*len-1;
int x=0,y=0;
int arr[][]=new int[len][size];
int base;
arr[0]