Header Ads

Serial Wise Right Angle Triangle Of Alphabet

Write a program to create the following Pyramid using C program?
         A
  A B
  A B C
  A B C D
  A B C D E

**********************Program************************

#include<stdio.h>
#include<conio.h>
main()
{
    int r,c,i;
    for(r=1;r<=6;r++)
    {
        i=0;
        for(c=r;c>=1;c--)
        {
            printf("%c ",65+i);
            i++;
        }
        printf("\n");
    }
    getch();

}


**********************Output*************************

screen shot for serial wise alphabet right angle triangle

No comments