摘要: 方法一:使用Math.Round()函数 double number = 3.14159;double result = Math.Round(number, 2); // 四舍五入保留两位小数Console.WriteLine(result); // 输出: 3.14 方法二:使用Math.Flo 阅读全文
posted @ 2024-06-26 15:04 乐 乐——1128 阅读(2) 评论(0) 推荐(0) 编辑