Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design a complete algorithm that determines the sales tax on purchases under $1.

ID: 3638980 • Letter: D

Question

Design a complete algorithm that determines the sales tax on purchases under $1.00 for a state with a 7% sales tax rate. Display thr sales tax amount if the number of cents entered was 99 or less; otherwise, display an error message. Instead of multiplying the amount of the sale by 7% and rounding, use the following list to determine the exact amount of sales tax: 0 to 7 cents: no tax 8 to 21 cents: 1 cent tax 22 to 35 cents: 2 cents tax 36 to 49 cents: 3 cents tax 50 to 64 cents: 4 cents tax 65 to 78 cents: 5 cents tax 79 to 92 cents: 6 cents tax 93 to 99 cents: 7 cents tax Hint: Because a Case structure can't handle ranges of numbers or inequality in JavaScript, a series of If/Else If statements should be used. Have the user enter the number of cents with no decimal point. Using pseudocode, design an algorithm for looking up the sales tax for amounts under $1.00. Save your pseudocode file as salesTaxLookup.txt.

Explanation / Answer

int n; int cent; printf("enter cents:-"); scanf("%d",¢); if(cent>99) { printf("error"); exit(1); } if(n>=0 ||n
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote