F Pattern program #2 in C | CodeTheta

Pattern program #2 in C

January 18, 2014

/* http://native-code.blogspot.com */
#include<stdio.h>
#include<conio.h>
void main()
{

 int a,b,i,j,k,n=70;
 printf(" /* http://native-code.blogspot.com */ \n\n\n\n\t\t\t");
 for(a=65;a<=71;a++)
 {
  printf("%c",a);
 }
 for(b=70;b>=65;b--)
 {
  printf("%c",b);
 }

 printf("\n");

 for(i=1;i<=11;i=i+2)
 {
  printf("\t\t\t");
  for(j=65;j<=n;j++)
  {
   printf("%c",j);
  }
  for(j=1;j<=i;j++)
  {
   printf(" ");
  }
  for(k=n;k>=65;k--)
  {
   printf("%c",k);
  }
  printf("\n");
  n=n-1;
 }
 getch();
}
/* http://native-code.blogspot.com */

Post a Comment