C++ and C Program to Print Alphabet Pattern with flowchart
C++ and C Program to Print Alphabet Pattern with flowchart
In this tutorial, we will learn about the followings;
- Flowchart of program to Print Alphabet Pattern
- C++ Program to Print Alphabet Pattern
- C Program to Print Alphabet Pattern with flowchart
Flowchart of program to Print Alphabet Pattern
C++ Program to Print Alphabet Pattern
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #include<iostream> using namespace std; int main() { int x; int y; int z; char a; cout<<"enter number of rows "<<endl; cin>>z; a='A'; for(x=0;x<z;x++) { for(y=0;y<=x;y++) { if(a=='Z') break; cout<<a; a++; } cout<<endl; } return 0; } |
Output
C Program to Print Alphabet Pattern with flowchart
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include<stdio.h> void main() { int l; int m; for(l=1;l<=5;l++) { for(m=1;m<=l;m++) { printf("%c",'A' + m-1); } printf("\n"); } } |
Output