Alphabet pattern of X

    Code : Alphabet pattern of X 

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

int main()
{
int i,j,count1=1,count2=10;
system("color 0D");
for(i=0;i<=11;i++)
{
      for(j=0;j<=11;j++)
      {
      if(j==count1||j==count2)
      {
      printf("***");
  }
  else
  {
  printf("  ");
  }
  }
  if(i<=4)
{
count1++;
    count2--;
}
else if(i<=11)
{
count1--;
count2++;
}
printf("\n");
}
getche();
}

Post a Comment

0 Comments