如何编写一个只返回true的函数是字符是小写的 [英] How can I write a function that returns true only is the character is lowercase
本文介绍了如何编写一个只返回true的函数是字符是小写的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我怎么能写一个只有当charactar是小写charactar才能返回true的函数
,我不能使用if语句
我尝试了什么:
how i can write a function that return true only if the charactar is lowercase charactar
,i can't use if statement
What I have tried:
bool lowecase(char c)
if(c>='a'&&c<='z')
return true;
else
return false;
推荐答案
如何使用 islower() [ ^ ]方法。
这篇关于如何编写一个只返回true的函数是字符是小写的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文