Write a program in C++ that take a single character from the user, and tells it's a Small Letter or it's a CAPITAL letter using nested if statement only.

Write a program in C++ that takes a single character from the user, and tells whether it's a Small

 The letter or it's a CAPITAL letter using a nested if statement only.


Write a program in C++ that take a single character from the user, and tells it's a Small Letter or it's a CAPITAL letter using nested if statement only.
Write a program in C++ that take a single character from the user, and tells it's a Small Letter or it's a CAPITAL letter using nested if statement only.


SOLUTION :


#include<iostream>

using namespace std; 

int main ()

{

    char ch;

    cout<<"Enter only Character :";

    cin>>ch;

    if(ch>='a'&& ch<='z')

    {

    cout<<"Enter Small Letter"<<endl;

}

else if(ch>='A'&& ch<='Z')

{

cout<<"Enter Large Letter"<<endl;

}

else

{

cout<<"Not Character"<<endl;

}

    return 0;

}



 random/hot-posts 

PROGRAMMING QUESTIONS/feat-big

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.