#include
using namespace std;
int main(){
double a,b,n;
cin>>a>>b;
n=a/b/b;
if(n<18.5)
cout<<"瘦猪";
else if(n<=22.9)
cout<<"正常乳猪";
else if(n<=24.9)
cout<<"大猪";
else if(n<=25.9)
cout<<"肥猪";
else if(n>=26)
cout<<"重度肥猪";
return 0;
}
共 2 条回复
额。。。。。。。。。
#include using namespace std; int main(){ double a,b,n; cin>>a>>b; n=a/b/b; if(n<18.5)
cout<<"瘦猪"; else if(n<=22.9) cout<<"正常乳猪"; else if(n<=24.9) cout<<"大猪"; else if(n<=25.9) cout<<"肥猪"; else if(n>=26) cout<<"重度肥猪"; return 0; }