这道题该怎么思考呢?请大家帮我一下。可以吗?
float DisCount( float price)
{
if(price <= 0)
return 0;
if(price > 1000)
price = price * 0.9;
else if( price > 500)
price = price * 0.95;
else if( price > 100)
price = price * 0.98;
return price;
}
[此贴子已经被作者于2007-6-3 19:25:18编辑过]