acm中wrong answer at test 4
#include<iostream>usingnamespacestd;intmain(){floatw,h,p;cin>>w>>h;p=w/(h*h*h)*100000...
#include<iostream>
using namespace std;
int main()
{
float w,h,p;
cin>>w>>h;
p=w/(h*h*h)*100000 ;
if(p<1.00) cout<<"Thin";
if(p>=1.00&&p<1.15) cout<<"Little thin";
if(p>=1.15&&p<1.45) cout<<"Standard";
if(p>=1.45&&p<1.60) cout<<"Little Fat";
if(p>=1.60) cout<<"Too Fat";
return 0;
} 展开
using namespace std;
int main()
{
float w,h,p;
cin>>w>>h;
p=w/(h*h*h)*100000 ;
if(p<1.00) cout<<"Thin";
if(p>=1.00&&p<1.15) cout<<"Little thin";
if(p>=1.15&&p<1.45) cout<<"Standard";
if(p>=1.45&&p<1.60) cout<<"Little Fat";
if(p>=1.60) cout<<"Too Fat";
return 0;
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询