How to determines whether a character is a lowercase in C++

1 Answer

0 votes
#include <iostream>

using namespace std;

int main()
{
	
	char ch = 'A';
	if (islower(ch))
		cout << "yes" << endl;
	else
		cout << "no" << endl;

	ch = 'a';
	if (islower(ch))
		cout << "yes" << endl;
	else
		cout << "no" << endl;

	return 0;
}


/*
run:

no
yes

*/

 



answered Dec 6, 2016 by avibootz

Related questions

1 answer 163 views
1 answer 162 views
1 answer 184 views
1 answer 153 views
1 answer 136 views
1 answer 173 views
...