C语言学习第五章T2 发表于 2018-02-08 更新于 2019-10-31 阅读次数: 题目:编程输出特定的数字 1 0 0 0 0 0 2 1 0 0 0 0 3 2 1 0 0 0 4 3 2 1 0 0 5 4 3 2 1 0 6 5 4 3 2 1 主要代码:123456789101112131415161718# include <stdio.h>int main (void){ int a[6]={1,0,0,0,0,0},i,x,y; for (i=0;i<6;i++) { for (x=0;x<6;x++) { printf("%4d",a[x]); } printf("\n"); for (y=0;y<=i+1;y++) { a[y]=a[y]+1; } } return 0;} 运行结果: