zoukankan      html  css  js  c++  java
  • 资金支付 保留两位小数

    public static void main(String[] args) {
           DecimalFormat format = new DecimalFormat("0.00");
           String abc ="100.456";
           String a = format.format(new BigDecimal(abc));
           System.out.println(a);
       }

    decimal money1 = Decimal.Parse(parame[5].Value.ToString("#0.00"));

    double d;   
    double.Parse(String.Format("{0:N}",d)); 

    double x = double.Parse("");
      double y = x % 0.01;
      double z = x - y;

    decimal d = 46.28111;

    string dStr = Math.Round( d,2 ).ToString();

    结果:dStr == "46.28"

  • 相关阅读:
    6.8
    6.7
    6.2
    6.1儿童节
    5.24
    5.22
    5.18
    5.17
    Visual Studio开始一个HelloWorld的enclave程序
    以太坊MPT树的HP(Hex-Prefix)编码
  • 原文地址:https://www.cnblogs.com/DTWolf/p/4720742.html
Copyright © 2011-2022 走看看