L1-031 到底是不是太胖了 (10分)
题目详情:
AC代码:
#include<iostream>
#include<cmath>
using namespace std;
void fun(int a,int b);
int main()
{
int n,a,b;
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>a>>b;
fun(a,b);
}
return 0;
}
void fun(int a,int b)
{
float p=(a-100)*0.9*2;//标准体重
if(fabs(b-p)<p*0.1)
cout<<"You are wan mei!"<<endl;
else if(b<p)
cout<<"You are tai shou le!"<<endl;
else if(b>p)
cout<<"You are tai pang le!"<<endl;
}
永远相信美好🎈