Translate

Labels

Sunday 26 January 2014

ALPHABET PATTERN_2

A C program to print the following pattern:
E
DE
CDE
BCDE
ABCDE


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

No comments: