3116:练20.1 适合晨练
练 20.1 适合晨练
2054:【例3.4】适合晨练
2054:【例3.4】适合晨练
【信息学奥赛】例题3.4——适合晨练_哔哩哔哩_bilibili
2054:【例3.4】适合晨练-信息学奥赛一本通_哔哩哔哩_bilibili
【例3.4】适合晨练(信息学奥赛一本通-T2054)_哔哩哔哩_bilibili
#include<iostream>
using namespace std;
int main(){
int t;
cin>>t;
if(25<=t&&t<=30){
cout<<"ok!";
}
else cout<<"no!";
return 0;
}
3117:练20.2 判断是否为两位数
练 20.2 判断是否为两位数
1044:判断是否为两位数
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a;
cin>>a;
if( a>=10 && a<=99 )
{
cout<<1<<endl;
}
else
{
cout<<0<<endl;
}
return 0;
}
3118:练20.3 开灯关灯
练 20.3 开灯关灯
第16课 开灯关灯 《小学生C++趣味编程》
#include<bits/stdc++.h>
using namespace std;
int main()
{
if( 5%2==0 )
{
cout<<"灯灭"<<endl;
}
else
{
cout<<"灯亮"<<endl;
}
return 0;
}
3119:练20.4 判断点在第几象限
练 20.4 判断点在第几象限
#include<iostream>
using namespace std;
int main(){
int x,y;
cin>>x>>y;
if(x>0&&y>0){
cout<<"1";
}
else if(x>0&&y<0){
cout<<"4";
}
else if(x<0&&y<0){
cout<<"3";
}
else{
cout<<"2";
}
return 0;
}
3120:练20.5 点和正方形的关系
练 20.5 点和正方形的关系
1056:点和正方形的关系