Translate

Labels

Wednesday 29 January 2014

ALPHABET PATTERN_3

A C program to print following pattern


ABCDE
ABCD
ABC
AB
A


main()
{
int ,i,j,n;
clrscr();
printf("Enter the number of rows:");
scanf("%d",&n);
for(i=n;i>=1;i--)
{
for(j=1;j<=i;j++)
{
printf("%c",'A'+j-1);
}
printf("\n");
}
getch();
}

No comments: