C++ Program to Display a-z Characters using For loop

Write C++ Program to Display a-z Characters using For loop

// CPP Program to Display a-z Characters using For loop

#include <iostream>

using namespace std;

int main()
{
	cout << "Small Letters :--> ";
	char i;

	for(i = 97; i <= 122; i++)
	{
		cout << i << " ";
	}

	cout << "\nCapital Letters :--> ";
	char j;
        for(j = 65; j <= 90; j++)
	{
		cout << j << " ";
	}
	return 0;
}

Output:

Small Letters :--> 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
Capital Letters :--> 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

≪ Previous | Next ≫