The function discountPrice() accepts an item's price and the discount percentage as parameters. It uses those values
Fantastic news! We've Found the answer you've been seeking!
Question:
The function discountPrice() accepts an item's price and the discount percentage as parameters. It uses those values to calculate and return the discounted price of the item.This function has only one error.
Function Real discountPrice(real price, real percentage){
//Declarations of variables
Declare Real discount
Declare Real discountPrice
//Calculations/processing
discount = price * percentage
discountPrice = price - discount
Return discount
}
Related Book For
Posted Date: