Contact Learn C
Copy Program Share Program

Program 155:Left Alpha Pyramid 1

Program 155:

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

//Coming Soon...

Output:

Left 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