Alphabet Pattern

C program to display alphabet pattern

C program to display alphabet pattern

In this tutorial, we will discuss the concept of C program to display the alphabet pattern.

In this post, we will display ten alphabet patterns program and explain how to print using for loop

Pattern programs

Program 1

C Program Alphabet Pattern 1

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 1\n");
    int i,j;
    for(i=1; i<=5; i++){
        for(j=1; j<=i; j++){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 1

A
BB
CCC
DDDD
EEEEE

 

Program 2

C Program Alphabet Pattern 2

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 2\n\n");
    int i,j;
    for(i=1; i<=5; i++){
        for(j=5; j>=i; j--){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 2

AAAAA
BBBB
CCC
DD
E

 

Program 3

C Program Alphabet Pattern 3

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 3\n\n");
    int i,j;
    for(i=1; i<=5; i++){
        for(j=1; j<=i; j++){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 3

A
AB
ABC
ABCD
ABCDE

 

Program 4

C Program Alphabet Pattern 4

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 4\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=i; j<=6; j++){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 4

E
EF
DEF
CDEF
BCDEF
ABCDEF

 

Program 5

C Program Alphabet Pattern 5

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 5\n\n");
    int i,j;
    for(i=1; i<=6; i++){
        for(j=i; j>=1; j--){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 5
A
BA
CBA
DCBA
EDCBA
FEDCBA

 

Program 6

C Program Alphabet Pattern 6

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 5\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=6; j>=i; j--){
        printf("%c",'A'+j-1);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 6

F
FE
FED
FEDC
FEDCB
FEDCBA

 

Program 7

C Program Alphabet Pattern 7

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 5\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=1; j<=i; j++){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 7

FFFFFF
EEEEE
DDDD
CCC
BB
A

 

Program 8

C Program Alphabet Pattern 8

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 8\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=6; j>=i; j--){
        printf("%c",'A'-1+i);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 8

F
EE
DDD
CCCC
BBBBB
AAAAAA

 

Program 9

C Program Alphabet Pattern 9

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 8\n\n");
    int i,j;
    for(i=1; i<=6; i++){
        for(j=6; j>=i; j--){
        printf("%c",'A'-1+j);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphaber pattern 9

FEDCBA
FEDCB
FEDC
FED
FD
F

 

Program 10

C Program Alphabet Pattern  10

#include <stdio.h>
#include <stdlib.h>

int main()
{
    printf("Alphabet pattern 10\n\n");
    int i,j;
    for(i=6; i>=1; i--){
        for(j=i; j>=1; j--){
        printf("%c",'A'-1+j);
    }
    printf("\n");
    }
     getch();
    return 0;
}

When the above code is executed, it produces the following results

Alphabet pattern 10

FEDCBA
EDCBA
DCBA
CBA
BA
A

 

Suggested for you

C program for loop

C program nested for loop

C program operator

C program variable

 

 

Reverse number pattern in Cpp using while loop
Java program to display triangle alphabet pattern
Karmehavannan

I am Mr S.Karmehavannan. Founder and CEO of this website. This website specially designed for the programming learners and very especially programming beginners, this website will gradually lead the learners to develop their programming skill.

Recent Posts

PHP Star Triangle pattern program

PHP Star Triangle pattern program In this tutorial, we will discuss about PHP Star Triangle…

2 months ago

PHP Full Pyramid pattern program

PHP Full Pyramid pattern program In this tutorial, we will discuss about PHP Full Pyramid…

2 months ago

5 methods to add two numbers in Java

5 methods to add two numbers in Java In this tutorial, we will discuss the…

2 months ago

Python Full Pyramid star pattern program

Python full Pyramid star pattern program In this tutorial, we will discuss  the concept of…

5 months ago

Write a function or method to convert C into F -Entered by user

Write a function or method to convert C into F -Entered by the user In…

10 months ago

How to write a function or method to convert Celsius into Fahrenheit

How to write a function or method to convert Celsius into Fahrenheit In this tutorial,…

10 months ago