必对题解
2026-01-28 11:14:49
发布于:天津
0阅读
0回复
0点赞
代码如下:
#include<bits/stdc++.h>
using namespace std;
bool check(int x){//check函数用来判断是否为两位数
if(x<=99&&x>=10)return true;//是两位数则返回true(真)
else return false;//否则返回false(假)
}
int main(){
int n;//定义n
cin>>n;//输入n
//调用check函数判断:是两位数输出yes,不是两位数输出no(在这里提醒一下都是小写字母)
if(check(n))cout<<"yes";
else cout<<"no";
return 0;
}
点点赞吧
祝你永远
这里空空如也







有帮助,赞一个