Home > Back-end >  About the print layout problem
About the print layout problem

Time:09-30

Why is set to % 6 d printing Yang hui triangle, line 22 is three squares? I didn't understand the relation between, if is two or four Spaces, will twist printed triangle towards the left or right in the past,

The code in the first floor

CodePudding user response:

#include
Int main ()
{
int i,j;
Int k, n=0;
Int a [14] [14].
While (n<=0 | | n>=13)
{
Printf (" please input to print the number of lines: \ n ");
The scanf (" % d ", & amp; n);
}
Printf (" print Yang hui triangle is as follows: \ n ");
for(i=0; iA [I] [0]=a [I] [I]=1;
For (I=2; iFor (j=1; jA [I] [j]=[I - 1] a [j] + [I - 1] a [1].

for(i=0; i{
For (k=0; KPrintf (" ");
for(j=0; j<=I; J++)
Printf (" % d "6, a [I] [j]);
printf("\n");
}
printf("\n");
}

CodePudding user response:

Half space is 6, just in the middle,
  • Related