how to make Alphabet D pattren in c languge

how to make Alphabet D pattren in c languge

CODE:

#include<stdio.h>
#include<conio.h>
#include<stdlib.h>

int main()
{
int i,j,k;
system("color 06");
for(i=0;i<=11;i++)
{
for(j=0;j<2;j++)
{
printf("*");
}
for(k=1;k<=5;k++)
{
if(i>=0&&i<2||i>9&&i<=11||k==5)
{
printf("**");
}
else
{
printf("  ");//two spaces
}
}
for(j=0;j<2;j++)
{
if(i>=0&&i<2||i>9&&i<=11)
{
printf(" ");
}
else
{
printf("*");
}
}
printf("\n");
}
getche();
}

Popular posts from this blog

code of Alphabet K pattern

Happy New Year 2021 Wishes

5 Ways to Earn from LinkedIn