A B C D E F G F E D C B A
A B C D E F E D C B A
A B C D E D C B A
A B C D C B A
A B C B A
A B A
A
#include
#incldue
int main( )
{
int r,c,askey,sp;
clrscr( );
for( r=7; r>=1; r-- )
{
for(sp=6; sp>=r; sp--)
printf(" "); //2 spaces
askey=65;
for(c=1; c<=r; c++ )
printf("%2c", askey++ );
for(c=r-1; c>=1; c-- )
printf("%2c", --askey);
printf("\n");
}
getch();
return 0;
}
Output:-
A B C D E F G F E D C B A
A B C D E F E D C B A
A B C D E D C B A
A B C D C B A
A B C B A
A B A
A
Write a C program to print the given alphabet pyramid -2
#vpsinghrajput
Author & Editor
Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.
3:45 AM
Subscribe to:
Post Comments (Atom)
hey buddy!!!
ReplyDeletethe output is coming wrong here..... its coming as,
A B C D E F G g F E D C B
A B C D E F f E D C B
A B C D E e D C B
A B C D d C B
A B C c B
A B b
A
Hi Cnraj23 output is write. PLZ review your program again. or contact me by mail Emial ID:- cs3.vijay@gmail.com
ReplyDelete