Question: Can you find the reason that the following pseudocode function does not return the value indicated in the comments? // The calcDiscount Price function accepts

Can you find the reason that the following pseudocode function does not return the value indicated in the comments?// The calcDiscount Price function accepts an item's price and // the discount percentage as arguments. It

// The calcDiscount Price function accepts an item's price and // the discount percentage as arguments. It uses those // values to calculate and return the discounted price. Function Real calcDiscount Price (Real price, Real percentage) // Calculate the discount. Declare Real discount = price * percentage // Subtract the discount from the price. Declare Real discount Price = price // Return the discount price. Return discount End Function - discount

Step by Step Solution

3.53 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The calcDiscountPrice function does not return the discounted price because it is returning the d... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Starting Out With Programming Logic And Design Questions!