Contact Learn C
Copy

Program 156:Left Alpha Pyramid 2

Program 156:

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

//Coming Soon...

Output:

Left Alpha Pyramid 4













 
Donate

Download App and Learn when ever you want

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