例如调用ShowPrice(5,10)后输出175.00。请注意程序的可读性和易于维护性。
static void ShowPrice(int num_chicken, int num_duck)
{
float totalPrice = 0.00f;
float price_chicken = 10f;
float price_duck = 12.5f;
totalPrice = num_chicken * price_chicken + num_duck * price_duck;
Console.WriteLine("总价钱为:{0:0.00}", totalPrice);
}