题目:
代码:
#include <iostream>
using namespace std;
#include<stdlib.h>
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
for(int i=0;i<n;i++)
{
int H;scanf("%d",&H);
float W;scanf("%f",&W);
float w_g=W/2;//真实_公斤
float w_b=(H-100)*0.9;//标准_公斤
float f=(w_g-w_b)*0.1;
if((f<0.1*w_b&&f>0)||(f>-(0.1*w_b)&&f<0))
{
printf("You are wan mei!\n");
}
else if(f>0.1*w_b)
{
printf("You are tai pang le!\n");
}
else if(f<-(0.1*w_b))
{
printf("You are tai shou le!\n");
}
}
}
ps:输出不太对,找到答案再校正吧