竞赛
考级
zsy
#include <iostream> using namespace std; int a,b; int main(){ cin>>a>>b; if(a<=1&&a>=-1&&b<=1&&b>=-1)cout<<"yes"; else cout<<"no"; return 0; }
小潘同学(能打过橙子同学)
#include<iostream> using namespace std; int main(){ long long a; cin>>a; if(a<=99){ cout<<a; return 0; } cout<<"99+"; return 0; }
LS_YZY
2.消息数量 思路分析 本题考查分支语句。对于消息数量不超过99的,直接输出消息数量;对于消息数量超过99的输出"99+"。用if - else 判断一下即可。 代码分析
桌子乱的反义词
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; if(n<=99){ cout<<n; } else{ cout<<"99+"; } return 0; }
智慧达达(1)