zoukankan      html  css  js  c++  java
  • c#100 计算行李重量

    using System;
    using System.Collections.Generic;
    using System.Text;
     
    namespace ConsoleApplication1
    {
        class 行李重量
        {
            static void Main(string[] args)
            {
     
                {
                    Double a;
                    while (true)
                    {
                        Console.Write("请输入行李重量(kg)");
     
                         a = Convert.ToDouble(Console.ReadLine());
     
     
     
                        if (a >= 0 && a <= 50)
                        {
                            Double g = a * 0.25;
                            Console.WriteLine("您的运费为"+(a*0.25)+"元");
     
     
                        }
                        else if (a > 50)
                        {
                            Console.WriteLine("您的运费为"+(a*0.25+(a-50)*0.4) +"元");
                        }
                        else
                        {
                            Console.WriteLine("您的输入有误");
                        }
     
    console.readline();
                    }
                }
            }
        }
    }
  • 相关阅读:
    [Asp.net]站点地图SiteMap
    [Asp.Net]最近一个项目的总结
    [Asp.net]说说密码框和只读框
    [工具]推荐一款查看dll依赖工具
    [工具]Serv-U配置教程
    [NHibernate]Nullables
    [NHibernate]NHibernate.Tool.hbm2net
    [NHibernate]使用AttributeNHibernate.Mapping.Attributes
    delphi跨平台SOCKET--System.Net.Socket
    INDY9发送tstream
  • 原文地址:https://www.cnblogs.com/w-wz/p/4438662.html
Copyright © 2011-2022 走看看