if语句判断身高体重是否标准
2015-07-07 16:58
281 查看
1.判断身高,体重是否标准
Console.WriteLine("请输入您的身高:"); int sg = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("请输入您的体重:"); int tz = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("请输入您的性别:"); string xb = Console.ReadLine(); if (xb =="男") { int bzs = sg - 100 + 3; int bzx = sg - 100 - 3; if (tz >= bzx && tz <= bzs) { Console.WriteLine("您的身材不错"); } else if (tz < bzx) { Console.WriteLine("您太瘦了,多吃点"); } else { Console.WriteLine("不能再吃了"); } } else if (xb=="女") { int bzs = sg - 110 + 3; int bzx = sg - 110 - 3; if (tz >= bzx && tz <= bzs) { Console.WriteLine("身材好,身材火辣"); } else if (tz < bzx) { Console.WriteLine("美女,有点瘦了"); } else { Console.WriteLine("再吃女神变屌丝了"); } } else { Console.WriteLine("没有您这种性别的人,请自己核实"); }
相关文章推荐
- Android 开源项目
- 浅谈spark yarn模式的问题调试
- 第2章 数字之魅——寻找最近点对
- js
- Android 触摸提示音
- view设置gone的时候getHeight()的值
- GRE写作必备句型
- Java语言的基础组成
- 打电话 发短信
- 使用Highcharts生成简略图
- 停止Java线程,小心interrupt()方法
- 关于转义字符
- WIN7下安装oracle 10g容易出现的问题
- 应付配置文件 Profile
- C# 开发积累(1)
- 深入理解DIP、IoC、DI以及IoC容器
- $@ 与$*之终极比较
- 表单根据不同的提交按钮转向不同的页面操作
- angular+requirejs前端整合
- PngOptimizer PNG压缩工具