杨辉三角形??
#include<iostream>using namespace std;
int main()
{
const int n=10;
int a[n][n];
int i,j;
for(i=0;i<n;i++)
{
for(j=0;j<=i;i++)
{
if(j==0||j==i)
{
a[i][j]=1;
}
else
a[i][j]=a[i-1][j-1]+a[i-1][j];
cout<<a[i][j]<<"\t";
}
cout<<"\n\n";
}
}
好像没错吧,怎么编译后直接崩溃了呢??