Write C++ program to print alphabets from a to z


techstudy.org

HP 15 Core i3 7th gen Laptop(4GB, 1TB HDD, Windows 10) | Rs. 31,490

Introduction

I have used CodeBlocks compiler for debugging purpose. But you can use any C++ programming language compiler as per your availability.


  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int character=0;
  7. char ch='A';
  8. do
  9. {
  10. character=int(ch);
  11.  
  12. cout<<ch<<" ";
  13. character++;
  14. ch=char(character);
  15.  
  16. }
  17. while(ch<='Z');
  18.  
  19.  
  20. }

Result

C++ language techstudy.org

     





Related Topics




Popular Posts