Chapter 1 Algorithm Workbench Write pseudocode algorithms for the programs descr
ID: 3883256 • Letter: C
Question
Chapter 1 Algorithm Workbench Write pseudocode algorithms for the programs described as follows: 1)- Available Credit A program that calculates a customer's available credit should ask the user for the following: . The customer's maximum amount of credit The amount of credit used by the customer Once these items have been entered, the program credit by subtracting the amount of credit from the maximum amount 2)- Sales Tax A program that calculates the total of a retail sale should ask the user for the following: should calculate and display the customer's available credit. You can calculate a The retail price of the item being purchased The sales tax rate One these items have been entered, the program should calculate and display the following: . The sales tax for the purchase . The total of the saleExplanation / Answer
1) Pseudocode for problem one is:
Step-1: BEGIN
Step-2: DECLARE: maxCredit, usedCredit, availCredit
Step-3: READ: maxCredit, usedCredit
Step-4: SET: availCredit = maxCredit - usedCredit
Step-5: DISPLAY: availCredit
Step-6: END
2) Pseudocode for problem 2 is:
In this, we are assuming that the sales tax rate is given in percentage
Step-1: BEGIN
Step-2: DECLARE: retailPrice, salesTaxRate, salesTaxAmount, totalSalesPrice
Step-3: READ: retailPrice, salesTaxRate
Step-4: SET: salesTaxAmount = (salesTaxRate / 100) * retailPrice
Step-5: SET: totalSalesPrice = retailPrice + salesTaxAmount
Step-6: DISPLAY: totalSalesPrice
Step-7: END
Hope this helps...
BEST WISHES!
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.