#include <stdio.h>
#define N 10
void main()
{
int i, j,count=1;
int a[N][N];
for (i=1;i<N;i++)
{
a[i][i]=1;a[i][1]=1;
}
for (i=3;i<N;i++)
for (j=2;j<i-1;j++)
a[i][j]=a[i-1][j-1]+a[i-1][j];
for (i=1;i<N;i++)
{
for (j=1;j<i;j++)
if(count++<=35)
printf("%3d",a[i][j]);
printf("\n");
}
}
红色部分也有错!!!!!!!!!!
#define N 10
void main()
{
int i, j,count=1;
int a[N][N];
for (i=1;i<N;i++)
{
a[i][i]=1;a[i][1]=1;
}
for (i=3;i<N;i++)
for (j=2;j<i-1;j++)
a[i][j]=a[i-1][j-1]+a[i-1][j];
for (i=1;i<N;i++)
{
for (j=1;j<i;j++)
if(count++<=35)
printf("%3d",a[i][j]);
printf("\n");
}
}
红色部分也有错!!!!!!!!!!