判断INT类型变量N是否为两位整数的逻辑表达式为
来源:百度知道 编辑:UC知道 时间:2024/05/15 18:48:01
判断INT类型变量N是否为两位整数的逻辑表达式为
#include <iostream>
using namespace std;
bool isxx(int n)
{
if ((n>=10&&n<=99)||(n>=-99&&n<=-10))
return true;
else
return false;
}
void main()
{
int a=65;
if (isxx(a))
cout<<"是两位数。"<<endl;
else
cout<<"不是两位数。"<<endl;
}
abs(N/10)<10