Price and Discount SolutionΒΆ

Here is my proposed solution for the price and discount problem described on the previous page. Your solution will almost certainly not look like mine, since everyone has their own way of solving problems and writing programs. I have deliberately used many small functions for clarity rather than having a few large functions, so your solution may be more compact.

Enter prices, separated by blanks:

Enter discount: %

Discounted prices:

Ignore the code in the right-hand panel. You should be able to fill in the form fields and then click the button to see the program in action.

Next Section - De-structuring