C++ Program to Display a-z Characters using While Loop

Write C++ Program to Display a-z Characters using While Loop

// CPP Program to Display a-z Characters using While Loop

#include <iostream>

using namespace std;

int main()
{
	cout << "For small letter:-->";
	char i = 97;

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

	cout << "\nFor Capital letter:-->";
	char j = 65;

	while ( j <= 90)
	{
		cout << j << " ";
		j++;
	}
	return 0;
}

Output:

For small letter :-->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
For Capital letter :-->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 ≫