时间限制: 1000 ms 内存限制: 65536 KB
【题目描述】
判断一个正整数是否是两位数(即大于等于10且小于等于99)。若该正整数是两位数,输出1,否则输出0。
【输入】
一个正整数,不超过1000。
【输出】
一行。若该正整数是两位数,输出1,否则输出0。
【输入样例】
54
【输出样例】
1
【解题代码】
#include <iostream>
using namespace std;
int main() {
int n;
cin>>n;
if(n>=10 && n<=99){
cout<<"1"<<endl;
}else{
cout<<"0"<<endl;
}
return 0;
}