回复 楼主 天衣boy
#include<stdio.h>int main()
{
int side;int i,idx,n=1,num;
printf("Input the length of the matrix side:");
scanf("%d",&side);
for(i=0;i<side;i++)
{
for(idx=0;idx<side;idx++)
{
num=idx<=i?n:0;
printf("%d,",num);
n=idx<=i?n+1:n;
}
printf("\n");
}
return 0;
}