Tuesday, May 15, 2012

C Program That Print The Left Angle Triangle Using Alphabets.

Hello friends today i'm sharing an interesting program with all of you,i hope you can understand this code.In this pattern i'm using simple concepts of c language,Just go through it.


A
Z
B   C
Y   X
D   E   F
W   V   U
G   H   I   J
T   S   R   Q
K   L   M   N   O


#include<stdio.h>
#include<conio.h>
int main()
{
 int i,j,l,m;
 clrscr();
 printf("\n HERE IS YOUR PATTERN:\n");
 l=65;
 m=90;
 for(i=1;i<=5;i++)
 {
  for(j=1;j<=i;j++)
  {
   printf("  %c",l++);
  }
  printf("\n");
  for(j=1;j<=i;j++)
  {
   if(i==5)
    printf(" ");
   else
    printf("  %c",m--);

  }
  printf("\n");
 }
 getch();
 return(0);
}



 Thanks Friends......

No comments:

Post a Comment

Please Give Me Your Views

Popular Posts