regarding with islower() argument, I tried to make a script
when I enter the letter with lower case, program detects it and told me that but how

i used if else loop but something is wrong, error is seen on islower?

my program

#include cstdlib
#include iostream
#include conio.h
#include iomanip

using namespace std;

int main(int argc, char *argv[])
{
char c;
cin >> c;
if (islower(c))
cout << "lower " << c;
else
cout << "upper " << c;

getch();
}

burcin

Recommended Answers

All 2 Replies

You mean like this?

#include <conio.h>
#include <iostream>
using std::cout;
using std::cin;

int main()
{

    char c;
    while(true)
    {
        cout << "Enter a character\n";
        c = getche();
        if( islower(c) )
            cout << "\nLower\n";
        else
            cout << "\nNot lower\n";
    }
}

thanks , your program is working.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.