Huh? Doesn't look like a definite pattern to me, why would you wanna build it? Are there any rules specified?
Anyway, here's my shot again:
Code:
#include<stdio.h>
int main()
{
int i, j, a[4]={3, 3, 2, 1};
for(i=0;i<4;i++)
{
for(j=(2*a[i]);j>0;j--)
{
printf("*");
if((i==0)&&(j==a[i]+1))
{
printf("*");
continue;
}
if(j==a[i]+1)
{
printf(" ");
continue;
}
}
printf("\n");
}
}
Outputs as:
Code:
*******
*** ***
** **
* *
Its stupid to do this when there are no rules at all cause you can directly print the pattern!