9 条题解
- 1
信息
- ID
- 621
- 时间
- 1000ms
- 内存
- 125MiB
- 难度
- 5
- 标签
- (无)
- 递交数
- 532
- 已通过
- 200
- 上传者
#include<iostream>
using namespace std;
int main(){
float m,h,a;
cin>>m>>h;
a=m/(h*h);
if (a<18.5) cout<<"Underweight";
if (a>=18.5 and a<24) cout<<"Normal";
else{
if(a>=24){
cout<<a<<endl;
cout<<"Overweight";
}
}
return 0;
}
#include<bits/stdc++.h> using namespace std; int main(){ double m,h,c; cin>>m>>h; c=m/(h*h); if(c<18.5)cout<<"Underweight"; if(c>=18.5 && c<24)cout<<"Normal"; if(c>=24)cout<<c<<endl<<"Overweight"; return 0; }
#include
using namespace std;
int main(){
float m,h,a;
cin>>m>>h;
a=m/(h*h);
if (a<18.5) cout<<"Underweight";
if (a>=18.5 and a<24) cout<<"Normal";
else {
if (a>=24){
cout<<a<<endl;
cout<<"Overweight";
}
}
return 0;
}
#include<bits/stdc++.h> using namespace std; int main(){ double m,h,n; cin>>m>>h; n=m/h/h; if(n<18.5){ cout<<"Underweight"; } if(n>=18.5 and n<24){ cout<<"Normal"; } if(n>=24){ cout<<n<<endl; cout<<"Overweight"; } return 0 ; }
#include
using namespace std;
int main(){
float m,h,a;
cin>>m>>h;
a=m/(h*h);
if (a<18.5) cout<<"Underweight";
if (a>=18.5 and a<24) cout<<"Normal";
else {
if (a>=24){
cout<<a<<endl;
cout<<"Overweight";
}
}
return 0;
}
#include
using namespace std;
int main(){
float m,h,a;
cin>>m>>h;
a=m/(h*h);
if (a<18.5) cout<<"Underweight";
if (a>=18.5 and a<24) cout<<"Normal";
else {
if (a>=24){
cout<<a<<endl;
cout<<"Overweight";
}
}
return 0;
}
#include
using namespace std;
int main(){
float m,h,a;
cin>>m>>h;
a=m/(h*h);
if (a<18.5) cout<<"Underweight";
if (a>=18.5 and a<24) cout<<"Normal";
else{
if(a>=24){
cout<<a<<endl;
cout<<"Overweight";
}
} return 0; }
#include<iostream>
using namespace std;
int main(){
float m,h,a;
cin>>m>>h;
a=m/(h*h);
if (a<18.5) cout<<"Underweight";
if (a>=18.5 and a<24) cout<<"Normal";
else {
if (a>=24){
cout<<a<<endl;
cout<<"Overweight";
}
}
return 0;
}