Tuesday
September 1, 2015

Homework Help: computer science

Posted by Terry on Wednesday, November 21, 2012 at 9:55pm.

Can you find the reason that the following pseudocode function does not return the value indicated in the comments?
// The calcDiscountPrice function accepts an itemís price and
// the discount percentage as arguments. It use those
// values to calculate and return the discounted price.
Function Real calcDiscountPrice(Real price, Real Percentage)
// Calculate the discount.
Declare Real discount = price * percentage

// Subtract the discount from the price.
Declare Real discountPrice = price Ė discount

// Return the discount price.
Return discount
End Function

Answer this Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Members