- Home
- Course Category
- Course Result
- Course Detail
Hot Line: 0124-2383121
Course Introduction
Programs for practice
Following C++ program ask to the user to enter a character to check whether it is an alphabet or not, then display the output on the screen:
Source Code:To Check whether an input is Alphabet or Not
/* C++ Program - To Check whether an input is Alphabet or Not*/ #include<iostream.h> #include<conio.h> void main() { clrscr(); char ch; cout<<"Enter a character: "; cin>>ch; if((ch>='a'&& ch<='z') || (ch>='A' && ch<='Z')) { cout<<ch<<" is an alphabet"; } else { cout<<ch<<" is not an alphabet"; } getch(); }Output
Enter a character: 3 3 is not an alphabet