int a = , b = ;
decimal c = (decimal)a / b; decimal result_d = Math.Round(c * , );
string result = (Math.Round(c * , )).ToString() + "%"; Console.WriteLine( - result_d);
Console.WriteLine(result);
Console.ReadKey();

C# 求百分比并保留2位小数-LMLPHP

05-11 21:43