Contact Learn C
Copy Program Share Program

Program 71:Alpha Pyramid 1

Program 71:
 
#include<stdio.h>
main()
{
    int i,j,k,rows,count,temp=1,alpha;
    printf("Enter number of rows:\n");
    scanf("%d",&rows);
    count=rows-1;
    alpha=65;
    for(i=1;i<=rows;i++)
    {
        for(j=1;j<=count;j++)
        {
            printf(" ");
            
        }
        for(k=1;k<=temp;k++)
        {
            printf("%c",alpha);
        }
        count--;
        temp+=2;
        alpha++;
        printf("\n");
    }    
}
Explanation:

//Coming Soon...


 Output:

Alpha Pyramid 1

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide