Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

In need plsss

0 votes
asked Feb 7, 2018 by Justin Apilado (390 points)
prepare a program that will determine if the value entered by
the user is numeric or alphabetic. If alphabetic, the computer
should also determine if it is lower case or upper case in c++..

1 Answer

0 votes
answered Feb 8, 2018 by Laxaman Pal (440 points)

#include <iostream>

#include <cctype>

using namespace std;

int main()
{
    char ch;
    cout<<"Enter a single value : ";
    cin>>ch;
    if(isalpha(ch))
    {
        if(isupper(ch))
        {
            cout<<"Value is upper case (alphabet)!!!";
        }
        if(islower(ch))
        {
            cout<<"Value is lower case (alphabet)!!!";
        }
    }
    else if(isdigit(ch))
    {
        cout<<"Value is numeric!!!";
    }
    else{
        cout<<"Entered value is neither alpha nor numeric!!!";
    }
    return 0;
}

Cheers yes

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...