#include
main()
{
char ch = 'A';
int n, c, k, space = 0;
clrscr();
printf("Enter Number of Rows..");
scanf("%d", &n);
for ( k = n ; k >= 1 ; k-- )
{
for ( c = 1 ; c <= space ; c++)
printf(" ");
space++;
for ( c = 1 ; c <= k ; c++ )
{
printf("%c ", ch);
ch++;
}
printf("\n");
ch = 'A';
}
getch();
return 0;
}
--------------------------------
Output:-
Enter Number of Rows..6
A B C D E F
A B C D E
A B C D
A B C
A B
A
No comments:
Post a Comment