0

hhmm.. i need to get the pattern of this particular output on one digit odd number.. could anyone please teach me? ^^

if the number is 9:

then the pattern is:

*000*000*

0*00*00*0

00*0*0*00

000***000

yeah, the three asterisks get nearer as the line gets down...

how can i formulate the formula needed for the loop?

this is what i made so far..

for(x=1;x<=4;x++)

printf("*");

for(y=1;y<=(num-3);y++)

{

printf("0");

}

printf("\n");

*Edited 7 Years Ago by kyumi419*: n/a