Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 cdCosts(cdPurchased) 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 >0 Then // IF statement for when the number of CDs purchased is less than ten, if more than 10, then the program continues down the list till it goes above 40 where the discount hits a limit of 25% off. If cdPurchased <10 Then Set cdPurchased = cdPurchased *15 Display "Your total cost is: ", cdPurchased Else If cdPurchased <=20 Then

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle9i Database Administration

Authors: Sam R. Alapati

1st Edition

1590590228, 978-1590590225

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago