当前位置:网站首页>身体质量指数程序,入门写死的小程序项目
身体质量指数程序,入门写死的小程序项目
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效果

边栏推荐
- Js+svg love diffusion animation JS special effects
- Advantages and disadvantages of code cloning
- Trace tool for MySQL further implementation plan
- 第五篇,STM32系统定时器和通用定时器编程
- 「笔记」折半搜索(Meet in the Middle)
- 深度学习框架TF安装
- Summary of being a microservice R & D Engineer in the past year
- Openjudge noi 1.7 08: character substitution
- ESP Arduino (IV) PWM waveform control output
- How to get started and improve test development?
猜你喜欢

动态规划思想《从入门到放弃》

"Exquisite store manager" youth entrepreneurship incubation camp - the first phase of Shunde market has been successfully completed!
做微服务研发工程师的一年来的总结
![[force buckle]41 Missing first positive number](/img/2e/6a0d3ea9264798f67be1ec1c81ca9e.jpg)
[force buckle]41 Missing first positive number
![[user defined type] structure, union, enumeration](/img/a5/d6bcfb128ff6c64f9d18ac4c209210.jpg)
[user defined type] structure, union, enumeration

Part VI, STM32 pulse width modulation (PWM) programming
![【批处理DOS-CMD命令-汇总和小结】-跳转、循环、条件命令(goto、errorlevel、if、for[读取、切分、提取字符串]、)cmd命令错误汇总,cmd错误](/img/a5/41d4cbc070d421093323dc189a05cf.png)
【批处理DOS-CMD命令-汇总和小结】-跳转、循环、条件命令(goto、errorlevel、if、for[读取、切分、提取字符串]、)cmd命令错误汇总,cmd错误

Learn to use code to generate beautiful interface documents!!!

界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?

Dell Notebook Periodic Flash Screen Fault
随机推荐
建立自己的网站(17)
mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such
pyflink的安装和测试
【JokerのZYNQ7020】AXI_ EMC。
Attention SLAM:一種從人類注意中學習的視覺單目SLAM
Segmenttree
Maidong Internet won the bid of Beijing life insurance to boost customers' brand value
Make a simple graphical interface with Tkinter
Grc: personal information protection law, personal privacy, corporate risk compliance governance
【案例分享】网络环路检测基本功能配置
[software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving
UI控件Telerik UI for WinForms新主题——VS2022启发式主题
New feature of Oracle 19C: automatic DML redirection of ADG, enhanced read-write separation -- ADG_ REDIRECT_ DML
第五篇,STM32系统定时器和通用定时器编程
[software reverse automation] complete collection of reverse tools
腾讯云 WebShell 体验
OSPF configuration command of Huawei equipment
Rainstorm effect in levels - ue5
Explain in detail the matrix normalization function normalize() of OpenCV [norm or value range of the scoped matrix (normalization)], and attach norm_ Example code in the case of minmax
「精致店主理人」青年创业孵化营·首期顺德场圆满结束!