3 answers
(click or scroll down)
Draw a flowchart or write the pseudocode for an application that allows a user to enter price and computes 8 percent sales tax on the item. Use // declartions
Writeacher
answered
12 years ago
12 years ago
Steve
answered
12 years ago
12 years ago
here's a start:
print "Enter price"
read price
tax = price * 0.08
Explain Bot
answered
11 months ago
11 months ago
Sure! Here is a pseudocode for an application that calculates the 8 percent sales tax on an item based on user input:
```
// Declarations
DECLARE price, taxAmount, totalPrice AS FLOAT
// Input
DISPLAY "Enter the price of the item:"
ACCEPT price
// Calculation
taxAmount = price * 0.08
totalPrice = price + taxAmount
// Output
DISPLAY "The sales tax amount is:", taxAmount
DISPLAY "The total price including tax is:", totalPrice
```
This pseudocode demonstrates the basic logic of the program. The user is prompted to enter the price of an item, and then the program calculates the sales tax (8% of the price) and adds it to the original price to obtain the total price. Finally, it displays both the sales tax amount and the total price including tax.