???
int n=123;
float result=((float)n)/100;

解决方案 »

  1.   

    int n=100;
    float result=((float)n)/100;
    result = System.Math.Round(result,2);
      

  2.   

    123 结果显示为1.23
    1000 结果显示为10.00
    用这个System.Math.Round
    可以
    0 的时候判断一下 直接显示0.00
      

  3.   

    int n=100;
    float result=((float)n)/100;
    string s=result.ToString("##0.00");
    Response.Write(s);
      

  4.   

    int n=100;
    float result=((float)n)/100;
    string s=result.ToString("##0.00");
    Response.Write(s);
    是对得,已经试过了:)
      

  5.   

    int n=123;
    float result=((float)n)/100;