-->

C program to print alphabetical pattern ABCDE

/**
 C program to print alphabetical  pattern ABCDE
ABCDE
ABCD
ABC
AB
A
 */
#include <stdio.h>
#include<conio.h>
void main()
{

int i, j;
for (i=5;i>=1;i--) {
for (j=0;j<i;j++) {
printf("%c", 'A'+ j);
}
printf("\n");
}
getch();
}

No comments:

Post a Comment