Star printing program in c, Pattern 7

Pattern 7 :




Code:
#include<stdio.h>

int main()
{
    int i, j, k;
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=6-i;j++)
        {
            printf("*");
        }
        for(k=1;k<i;k++)
        {
            printf("  ");
        }
        for(j=1;j<=6-i;j++)
        {
            printf("*");
        }
        printf("\n");
    }
    for(i=2;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("*");
        }
        for(k=1;k<=5-i;k++)
        {
            printf("  ");
        }
        for(j=1;j<=i;j++)
        {
            printf("*");
        }
        printf("\n");
    }

    return 0;
}

Return to: 

How to print stars pattern (" * ") in C ?

Previous pattern                                                                                    Next pattern

Star printing program in Java, pattern 7. How to print star in java and c programming.How to print star in java and c code. star printing code in c.