/* WAP TO PRINT THE FOLLOWING FORMAT :-
A B C D E F G F E D C B A
A B C D E F F E D C B A
A B C D E E D C B A
A B C D D C B A
A B C C B A
A B B A
A A
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
int k,l,m;
clrscr();
j=71;
k=j;
for(i=0;i<7;i++)
{
l=65;
while(l<=k)
{
printf(" %c",l);
l++;
}
if(i==0)
l=l-2;
else
{
for(m=1;m<(2*i-1);m++)
{
printf(" ");
}
l=l-1;
}
while(l>=65)
{
if(i==0)
printf(" %c",l);
else
printf(" %c",l);
l--;
}
printf("\n");
k--;
i++;
}
getch();
}
No comments:
Post a Comment