当前位置:网站首页>身体质量指数程序,入门写死的小程序项目
身体质量指数程序,入门写死的小程序项目
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
效果
边栏推荐
- ESP Arduino (IV) PWM waveform control output
- 建立自己的网站(17)
- UI控件Telerik UI for WinForms新主题——VS2022启发式主题
- What kind of experience is it to realize real-time collaboration in jupyter
- Attention slam: a visual monocular slam that learns from human attention
- 线段树(SegmentTree)
- 力扣1037. 有效的回旋镖
- fastDFS数据迁移操作记录
- MySQL中回表的代价
- 一行代码实现地址信息解析
猜你喜欢
Chapter II proxy and cookies of urllib Library
城联优品入股浩柏国际进军国际资本市场,已完成第一步
boot - prometheus-push gateway 使用
BFS realizes breadth first traversal of adjacency matrix (with examples)
Provincial and urban level three coordinate boundary data CSV to JSON
Chenglian premium products has completed the first step to enter the international capital market by taking shares in halber international
ESP Arduino (IV) PWM waveform control output
Dynamic planning idea "from getting started to giving up"
第五篇,STM32系统定时器和通用定时器编程
【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
随机推荐
What kind of experience is it to realize real-time collaboration in jupyter
Windows installation mysql8 (5 minutes)
Levels - UE5中的暴雨效果
Dell Notebook Periodic Flash Screen Fault
界面控件DevExpress WinForms皮肤编辑器的这个补丁,你了解了吗?
Chapter II proxy and cookies of urllib Library
OSPF configuration command of Huawei equipment
Dynamic planning idea "from getting started to giving up"
Meet the level 3 requirements of ISO 2.0 with the level B construction standard of computer room | hybrid cloud infrastructure
from . cv2 import * ImportError: libGL. so. 1: cannot open shared object file: No such file or direc
golang中的WaitGroup实现原理
golang中的atomic,以及CAS操作
Installation of torch and torch vision in pytorch
pytorch之数据类型tensor
自旋与sleep的区别
做微服务研发工程师的一年来的总结
批量获取中国所有行政区域经边界纬度坐标(到县区级别)
C Primer Plus Chapter 14 (structure and other data forms)
[batch dos-cmd command - summary and summary] - string search, search, and filter commands (find, findstr), and the difference and discrimination between find and findstr
A brief history of deep learning (II)