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
Program 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
#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
#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
#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
#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
#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
#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
#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
#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
#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
Similar post
Java program to print star pyramid pattern
C program to print star pyramid pattern
C++ program to print star pyramid pattern
Python program to print star pyramid pattern
Floyd’s triangle number pattern using for loop in C
Floyd’s triangle pattern using nested for loop in Java
Floyd’s triangle pattern using nested while loop in Java
Hollow pyramid triangle pattern in C++ language
Rhombus pattern in Java using for loop
Rhombus pattern in C using while loop
Rhombus pattern in C++ using do-while loop
Suggested for you
Do-while loop in Java language
Nested for loop in Java language
Nested for loop in C++ language
Nested for loop in Python language
C# inverted full pyramid star pattern In this article, we will discuss the concept of…
C# Full Pyramid star pattern program In this article, we will discuss the concept of…
Program to count vowels, consonants, words, characters and space in Java In this article, we…
How to print multiplication table using Array in C++ language In this post, we will…
C Program to multiplication table using Array In this tutorial , we will discuss about…
Java program to check odd or even using recursion In this tutorial, we discuss a…