Calculate Final Price with Discount Based on Total Amount - C Exercise