C++ Program to Display English Alphabets from A-Z
C++ Program to Display English Alphabets from A-Z
Explanation
In which program we will display English language alphabet A to Z in C++ programming using a do-while loop. This program is very basic in which firstly we will initialize char with ‘A’ and print using loop increment in char data type from A until condition meets the equal to ‘Z’ char.
Solution:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include<iostream> using namespace std; int main() { char character='A'; do { cout<<character<<" "; character++; } while(character<='Z'); cout<<endl; return 0; } |
Output: