In this C program, we will learn how to write a program to print Alphabet characters half pyramid.
Here is the code of the program to print Alphabet characters half pyramid.
/* C program to print Alphabet Characters half Pyramid
C program to print character pyramid as given below:
A 
B C 
D E F 
G H I J 
K L M N O
*/
#include <stdio.h>
int main()
{
    int i,j;
    char ch='A';
    
    for(i=1;i<=5;i++)
    {
        for(j=1;j<=i;j++)
        {
            printf("%c ",ch++);
        }
        printf("\n");
    }
    return 0;
}A
B C
D E F
G H I J
K L M N O
--------------------------------
Process exited after 0.05716 seconds with return value 0
Press any key to continue . . .
Comments