当前位置:网站首页>身体质量指数程序,入门写死的小程序项目
身体质量指数程序,入门写死的小程序项目
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
效果
边栏推荐
- 再聊聊我常用的15个数据源网站
- 深度学习简史(二)
- Set (generic & list & Set & custom sort)
- Threejs image deformation enlarge full screen animation JS special effect
- boot - prometheus-push gateway 使用
- Make a simple graphical interface with Tkinter
- ZABBIX 5.0: automatically monitor Alibaba cloud RDS through LLD
- A brief history of deep learning (II)
- Advantages and disadvantages of code cloning
- from . cv2 import * ImportError: libGL. so. 1: cannot open shared object file: No such file or direc
猜你喜欢
[force buckle]41 Missing first positive number
Windows installation mysql8 (5 minutes)
「精致店主理人」青年创业孵化营·首期顺德场圆满结束!
用tkinter做一个简单图形界面
Data processing of deep learning
Periodic flash screen failure of Dell notebook
ESP Arduino (IV) PWM waveform control output
[software reverse - solve flag] memory acquisition, inverse transformation operation, linear transformation, constraint solving
城联优品入股浩柏国际进军国际资本市场,已完成第一步
【JVM调优实战100例】05——方法区调优实战(下)
随机推荐
[C language] dynamic address book
腾讯云 WebShell 体验
Attention slam: a visual monocular slam that learns from human attention
Dell筆記本周期性閃屏故障
Chapter II proxy and cookies of urllib Library
How to get started and improve test development?
tensorflow 1.14指定gpu运行设置
golang中的atomic,以及CAS操作
Advantages and disadvantages of code cloning
Part 7: STM32 serial communication programming
Tensorflow GPU installation
Learning notes 5: ram and ROM
Deep learning environment configuration jupyter notebook
Part V: STM32 system timer and general timer programming
详解OpenCV的矩阵规范化函数normalize()【范围化矩阵的范数或值范围(归一化处理)】,并附NORM_MINMAX情况下的示例代码
boot - prometheus-push gateway 使用
[force buckle]41 Missing first positive number
Return to blowing marshland -- travel notes of zhailidong, founder of duanzhitang
Informatics Olympiad YBT 1171: factors of large integers | 1.6 13: factors of large integers
Informatics Orsay Ibn YBT 1172: find the factorial of n within 10000 | 1.6 14: find the factorial of n within 10000