C++ Alphabet Pattern 26

C++ Alphabet Pattern 26

Try to print the following alphabet pattern using C++.

Print This Output
ABCDE
BCDEA
CDEBA
DECBA
EDCBA

Source Code

C Compiler
#include <iostream> using namespace std; int main() { int i, j, k; for(i=65; i<=69; i++) { for(j=i; j<=69; j++) cout << char(j); for(k=i; k>65; k--) cout << char(k-1); cout << "\n"; } return 0; }

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author