作业 双分支

#include<iostream>
using namespace std;
int main()
{
    int a;
	cin>>a;

	if(20<=a&&a<=30)
	{
		cout<<"ok";
	}
	else
	{
		cout<<"no";
		
		
	}	
	return 0;
	
	
	
	
	
}
	

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
    int a;
	cin>>a;

	if(10>=a)
	{
		cout<<fixed<<setprecision(2)<<"2.50";
	}
	else
	{
		cout<<fixed<<setprecision(2)<<2.5+((a-10)*1.5);
		
		
	}	
	return 0;
	

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	int x;
	float a,y;
	cin>>x;
	cin>>y;
	if((y*1.0/x)/10==0)
	{
		a=y/x;
	}
	else
	{
		a=y/x+1;
		
	}
	cout<<a<<endl;

	return 0;
}

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	float a;
	cin>>a;
	if(a<=1.30)
	{
		cout<<60;
	}
	else
	{
		cout<<120;
		
	}


	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	if(a+b>c&&c+b>a&&a+c>b)
	{
		cout<<"yes";
	}
	else
	{
		cout<<"no";
		
	}


	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int a;
	cin>>a;
	if(a>30)
	{
		cout<<a/30+1;
	}
	else
	{
		cout<<"1";
		
	}


	return 0;
}

#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	float a,b,c,d;
	cin>>a>>b>>c;
	d=a+b+c;
	if(d>=200)
	{
		cout<<fixed<<setprecision(1)<<d*0.8;
	}
	else
	{
		cout<<fixed<<setprecision(1)<<d;
		
	}


	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int a,b,c,a2;
	
	cin>>a;
	b=a%10;
	c=a/10%10;
	a2=(b*10)+c;
	if(a>a2)
	{
		cout<<a;
	}
	else
	{
		cout<<a2;
		
	}


	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int y,b,c,d,n;
	
	cin>>y;
	b=y%10;
	c=y/10%10;
	d=y/100%10;
	n=(b*100)+(c*10)+d;
	
	if(y>n)
	{
		cout<<"y";
	}
	else
	{
		cout<<"n";
		
	}


	return 0;
}

#include<iostream>
using namespace std;
int main()
{
	int y,b,c,d,e,f,g,n;
	
	cin>>y;
	b=y%10;
	c=y/10%10;
	d=y/100%10;
    e=y/1000%10;
    f=y/10000%10;
    g=y/100000%10;
	n=(b*100000)+(c*10000)+(d*1000)+(e*100)+(f*10)+g;
	
	if(y>n)
	{
		cout<<"y";
	}
	else
	{
		cout<<"n";
		
	}


	return 0;
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值