满意答案
liuyi2296
2017.01.19
采纳率:41% 等级:9
已帮助:316人
123456789101112131415//#include "stdafx.h"//If the vc++6.0, with this line.#include "stdio.h"int main(void){int a[12]={0},n,i,j; printf("How many lines of output(<=10)?\n"); scanf("%d",&n); for(a[1]=i=1;i<=n;i++){ printf("%*c",45-2*i,' '); for(j=i;j>=1;j--) printf("%4d",a[j]+=a[j-1]); printf("\n"); } printf("\n"); return 0;}
00分享举报