Lecturer# 18 Finds a Character is Capital,Small or Digit| C++ Programming Tutorials in Urdu

Write a program that inputs a character and finds it is capital letter, small or Digit

include"iostream"
using namespace std;
main()
{
char ch;
cout<<"Enter a character = ";
cin>>n;
if(ch>='A' && ch<='Z')
{
cout<<"Capital Letter";
}
else if(ch>='a' && ch<='z')
{
cout<<"Small Letter";
}
else if(ch>='0' && ch<='9')
{
cout<<"It is a digit";
}
}

Watch video for more information

Leave a Reply