两个点错误,栽在这上面我没脸见人了
查看原帖
两个点错误,栽在这上面我没脸见人了
778490
CroxNither_QAQ楼主2023/4/27 22:06
#include<iostream> 
#include<cstring>
//#include<cmath>
//#include<algorithm>
//#include<iomanip>  cout<<fixed<<setprecision()
using namespace std;

int main(){
	double m,h;
	cin>>m>>h;
	double p=h*h;
	if(p==0){
		cout<<0;
		return 0;
	}
	double s=m/p;
	if(s<18.5){
		cout<<"Underweight";
	}else if(s>=18.5 && s<24){
		cout<<"Normal";
	}else if(s>=24){
		cout<<"Overweight";
	}
	
	return 0;
}
2023/4/27 22:06
加载中...