Q:

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

0

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

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

#include <iostream>
using namespace std;
 
int main()
{
    int character=0;
    char ch='A';
    do
    {
         character=int(ch);
 
         cout<<ch<<" ";
         character++;
         ch=char(character);
 
    }
    while(ch<='Z');
 
 
}

Result:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write C++ program to print ASCII value of all Uppe... >>