当前位置:网站首页>身体质量指数程序,入门写死的小程序项目
身体质量指数程序,入门写死的小程序项目
2022-07-06 17:23:00 【济南医疗小程序状元】
因为一个人有一个人的节奏,您,我的节奏显然是慢性子? 慢了一拍,然后还觉得正常节奏,就想错了。
#region 0.1 身体质量指数程序,入门小程序项目
double height = 1.78; // 身高变量,单位为米
int weight = 75;//体重变量,单位为千克
double exponent = weight / (height * height); // BMI计算公式。0.1 基础入门业务逻辑代码,实现代码功能所在
Console.WriteLine("---------身高质量指数小业务项目入门-----------");
Console.WriteLine("您的身高为:" +height);
Console.WriteLine("您的体重为:"+weight);
Console.WriteLine("您的BMI身体质量指数为:" +exponent);
Console.Write("您的体重属于: ");
//if 如果判断
if (exponent<18.5)
{// 判断BMI指数是否小于 18.5
Console.WriteLine("体重过轻");
}
else if(exponent>=18.5 && exponent <24.9)
{// 判断BMI指数是否大于或者等于18.5,并且小于24.9
Console.WriteLine("正常范围");
}
else if(exponent >=24.9 && exponent <29.9)
{ // 判断BMI指数是否大于等于24.9,并且小于29.9
Console.WriteLine("体重过重");
}
else if (exponent >= 29.9)
{// 判断BMI指数是否大于等于 29.9. 如果上面的条件成立,就执行大括号里面的代码,否则就执行其他选择选项的代码。
Console.WriteLine("肥胖");
}
Console.ReadLine();// 停到光标位置,显示内容
#endregion效果

边栏推荐
- Learning notes 5: ram and ROM
- Do you understand this patch of the interface control devaxpress WinForms skin editor?
- golang中的Mutex原理解析
- Part VI, STM32 pulse width modulation (PWM) programming
- Data type of pytorch tensor
- 「精致店主理人」青年创业孵化营·首期顺德场圆满结束!
- Batch obtain the latitude coordinates of all administrative regions in China (to the county level)
- Cause of handler memory leak
- gnet: 一个轻量级且高性能的 Go 网络框架 使用笔记
- Part V: STM32 system timer and general timer programming
猜你喜欢

建立自己的网站(17)
Summary of being a microservice R & D Engineer in the past year

Threejs image deformation enlarge full screen animation JS special effect

【案例分享】网络环路检测基本功能配置

Configuring OSPF basic functions for Huawei devices

迈动互联中标北京人寿保险,助推客户提升品牌价值

Five different code similarity detection and the development trend of code similarity detection

LLDP兼容CDP功能配置

UI控件Telerik UI for WinForms新主题——VS2022启发式主题

Chenglian premium products has completed the first step to enter the international capital market by taking shares in halber international
随机推荐
[HFCTF2020]BabyUpload session解析引擎
动态规划思想《从入门到放弃》
[software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving
Attention SLAM:一種從人類注意中學習的視覺單目SLAM
Do you understand this patch of the interface control devaxpress WinForms skin editor?
Deep understanding of distributed cache design
界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
【批处理DOS-CMD命令-汇总和小结】-跳转、循环、条件命令(goto、errorlevel、if、for[读取、切分、提取字符串]、)cmd命令错误汇总,cmd错误
"Exquisite store manager" youth entrepreneurship incubation camp - the first phase of Shunde market has been successfully completed!
Chapter II proxy and cookies of urllib Library
Slam d'attention: un slam visuel monoculaire appris de l'attention humaine
【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
Tensorflow GPU installation
Building a dream in the digital era, the Xi'an station of the city chain science and Technology Strategy Summit ended smoothly
【JVM调优实战100例】04——方法区调优实战(上)
The printf function is realized through the serial port, and the serial port data reception is realized by interrupt
Deeply explore the compilation and pile insertion technology (IV. ASM exploration)
Installation and testing of pyflink
Build your own website (17)
Learn self 3D representation like ray tracing ego3rt