是猪的人别看

yangyuheng 2019-12-16 18:43:23 2019-12-16 18:44:21 3

#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;

}

{{ vote && vote.total.up }}

共 2 条回复

akamegakiru

额。。。。。。。。。

yangyuheng

#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; }