Question: Gaddis Pseudocode Module main ( ) / / Declare variables. Declare Integer cdPurchased / / Ask the user to input the number of CDs they
Gaddis Pseudocode Module main Declare variables. Declare Integer cdPurchased Ask the user to input the number of CDs they wish to purchase, then call in the cdCosts module to calculate discoutns and final price. Display "Please enter the number of CDs you'd wish to purchase." Input cdPurchased Call cdCostscdPurchased End Module Module cdCosts Integer cdPurchased Declare variables for calculating discounts. Declare Integer originalPrice, finalPrice, discount Display an error message if user inputs a number that is less than zero, if more than zero then the program continues to calculate discounts If cdPurchased Then IF statement for when the number of CDs purchased is less than ten, if more than then the program continues down the list till it goes above where the discount hits a limit of off. If cdPurchased Then Set cdPurchased cdPurchased Display "Your total cost is: cdPurchased Else If cdPurchased Then
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
