C program to print pattern of alphabets

The following C program prints a pattern of alphabets.

Program: C program to print pattern of alphabets

#include<stdio.h>
int main()
{
    int i,j;
    for(i=1;i<=6;i++)
    {
        for(j=1;j<=i;j++)
            printf("%c",'A'+j-1);
        printf("\n");
    }
    return 0;
}

Run the above program and it will print a pattern of alphabets as per your algorithm.

You’ll get most of the pattern printing programs on Programming-Articles . Check them out.

Output:

A
AB
ABC
ABCD
ABCDE
ABCDEF

Share your code for similar pattern printing programs in the comments.

About ᴾᴿᴼᵍʳᵃᵐᵐᵉʳ

Linux and Python enthusiast, in love with open source since 2014, Writer at programming-articles.com, India.

View all posts by ᴾᴿᴼᵍʳᵃᵐᵐᵉʳ →

Leave a Reply

Your email address will not be published. Required fields are marked *