Write a C++ program to check whether a character is an uppercase or lowercase alphabet by using the switch statement.
Flowchart of the program to check a character is lowercase or an uppercase
C++ program to check whether a character is lowercase or an uppercase
#include<iostream> using namespace std; int main() { char ch; cout<<" ENTER a character"<<endl; cin>>ch; switch(ch) { case 'A'...'Z': cout<<"character "<<ch<<" is uppercase character"; break; case 'a'...'z': cout<<"character "<<ch<<" is lowercase character"; break; default: cout<<"invalid character"; } }
Output
ENTER a character
R character R is upper case character
SFT (Shamil’s Flow Table )
Are you interested to Read about SFT(Shamil’s Flow Table)?
Read More Similar Programs