Program To Check Character is Capital,Small,Special in C++

#include<iostream>
#include<conio.h>

using namespace std;

void main()
{
char ch;

cout<<"Enter the Character: ";
cin>>ch;

if(ch>=65&&ch<=90)
{
cout<<"\nCharacter is Capital";
}
else if(ch>=97&&ch<=122)
{
cout<<"\nCharacter is Small";
}
else if(ch>=48&&ch<=57)
{
cout<<"\nDigital";
}
else
{
cout<<"\nCharacter is Special";
}

getch();
}

No comments:

Post a Comment