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

边栏推荐
- 「精致店主理人」青年创业孵化营·首期顺德场圆满结束!
- Interface (interface related meaning, different abstract classes, interface callback)
- 【批处理DOS-CMD命令-汇总和小结】-跳转、循环、条件命令(goto、errorlevel、if、for[读取、切分、提取字符串]、)cmd命令错误汇总,cmd错误
- Configuring the stub area of OSPF for Huawei devices
- 自旋与sleep的区别
- BFS realizes breadth first traversal of adjacency matrix (with examples)
- Learning notes 5: ram and ROM
- [software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving
- Link sharing of STM32 development materials
- ZABBIX 5.0: automatically monitor Alibaba cloud RDS through LLD
猜你喜欢

力扣1037. 有效的回旋镖
![[user defined type] structure, union, enumeration](/img/a5/d6bcfb128ff6c64f9d18ac4c209210.jpg)
[user defined type] structure, union, enumeration

Windows installation mysql8 (5 minutes)

Part IV: STM32 interrupt control programming

Maidong Internet won the bid of Beijing life insurance to boost customers' brand value

Telerik UI 2022 R2 SP1 Retail-Not Crack

ActiveReportsJS 3.1中文版|||ActiveReportsJS 3.1英文版

Learn self 3D representation like ray tracing ego3rt

boot - prometheus-push gateway 使用
![[Niuke] [noip2015] jumping stone](/img/9f/b48f3c504e511e79935a481b15045e.png)
[Niuke] [noip2015] jumping stone
随机推荐
Part IV: STM32 interrupt control programming
【JVM调优实战100例】05——方法区调优实战(下)
Data type of pytorch tensor
Batch obtain the latitude coordinates of all administrative regions in China (to the county level)
pytorch之数据类型tensor
省市区三级坐标边界数据csv转JSON
How do novices get started and learn PostgreSQL?
界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
Levels - UE5中的暴雨效果
Make a simple graphical interface with Tkinter
BFS realizes breadth first traversal of adjacency matrix (with examples)
Dell筆記本周期性閃屏故障
「笔记」折半搜索(Meet in the Middle)
[100 cases of JVM tuning practice] 05 - Method area tuning practice (Part 2)
筑梦数字时代,城链科技战略峰会西安站顺利落幕
Summary of being a microservice R & D Engineer in the past year
[batch dos-cmd command - summary and summary] - jump, cycle, condition commands (goto, errorlevel, if, for [read, segment, extract string]), CMD command error summary, CMD error
mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such
Grc: personal information protection law, personal privacy, corporate risk compliance governance
Do you understand this patch of the interface control devaxpress WinForms skin editor?