Alphabet characters:
All English character are the alphabet characters.
Example-
a,b,c,d,...............x,y,z
A,B,C,D,...............X,Y,Z
How we identify?
-We use te ASCII value concept to identify each and every character of the keyword.
ASCII value for lower case alphabet:
a=97,b=98,.........z=122
ASCII value for upper case alphabet:
A=65,B=66,..........Z=90
program:
#include < iostream>
#include< math.h>
using namespace std;
int main()
{
char ch;
cout<<"Enter any Character"<< endl;
cin>>ch;
if((ch>='A' && ch<='Z')||(ch>='a' && ch<='z'))
cout<<"Character is alphabet";
else
cout<<"Character is not alphabet";
return 0;
}
Enter any Character
F
Character is alphabet
Enter any Character
7
Character is not alphabet