zoukankan      html  css  js  c++  java
  • 标准体重计算

    Console.WriteLine("请输入性别");       

              string xb = Console.ReadLine();        

             Console.WriteLine("请输入身高");         

            double sg = double.Parse(Console.ReadLine());         

            Console.WriteLine("请输入体重");        

             double tz = double.Parse(Console.ReadLine());        

             if (xb == "男")       

              {      

                   double n = tz - sg + 100;          

                   if (n >= -3 && n <= 3)           

              {             

                Console.WriteLine("你的体重是标准体重");        

                 }             

            else if (n > 3)          

               {           

                  Console.WriteLine("你该减肥了");

                 }          

               else           

              {        

               Console.WriteLine("你该吃肉了");            

               }           

             }             

                   else  if (xb == "女")         

            {            

             double n = tz - sg + 110;           

              if (n >= -3 && n <= 3)           

              {              

               Console.WriteLine("继续保持");        

                 }            

             else if (n > 3)            

             {            

                 Console.WriteLine("你该运动了");      

                   }              

           else          

               {                

             Console.WriteLine("你该增肥了");        

                 }          

           }           

          else        

             {            

             Console.WriteLine("输入错误");

              }

  • 相关阅读:
    Centos 端口被占用,kill被占用的进程
    Centos7 docker安装GitLab
    MongoDB 3.6.1集群部署
    MySql时区修改
    Springboot默认定时任务——Scheduled注解
    Nacos Docker集群部署
    docker-compose使用
    docker部署redis集群
    设置Redis集群访问密码(不停机设置)
    AWS SNS 创建 订阅 发布
  • 原文地址:https://www.cnblogs.com/shitouge/p/4307595.html
Copyright © 2011-2022 走看看