Write a program that will emulate a cash register. Ask the user to input the price of three items. Get a subtotal. Determine the tax (6% ) of the subtotal. Find the total amount of the sale subtotal plus tax. Display the price of each item, subtotal amount, tax amount and final amount.

maybe you can work with this as a model

@p = ();
$st = 0;

for ($i=1 ; $i <= 3 ; $i++) {
print "Price of item #$i: ";
$v = <STDIN>; chomp $v;
$p[$i] = $v;
$st += $v;
}
$tax = $st * 0.06;
$total = $st + $tax;
print "\nItem Price\n";
for ($i=1 ; $i <= 3 ; $i++) {
printf "%4d %12.2f\n",$i,$p[$i];
}
printf "%s\n","-"x17;
printf "subtotal: %7.2f\ntax: %12.2f\ntotal: %10.2f\n",$st,$tax,$total

sample run:

perl jiskha1.pl
Price of item #1: 1763.2
Price of item #2: .85
Price of item #3: 12

Item Price
1 1763.20
2 0.85
3 12.00
-----------------
subtotal: 1776.05
tax: 106.56
total: 1882.61

To write a program that emulates a cash register, you can use a programming language such as Python. Follow the steps below to achieve the desired outcome:

1. Ask the user to input the price of three items. You can use the `input()` function to prompt the user for input and store each item's price in separate variables. For example:

```python
item1 = float(input("Enter the price of item 1: "))
item2 = float(input("Enter the price of item 2: "))
item3 = float(input("Enter the price of item 3: "))
```

2. Calculate the subtotal by summing up the prices of the three items. This can be done by adding the values stored in the item variables together. For example:

```python
subtotal = item1 + item2 + item3
```

3. Determine the tax amount by multiplying the subtotal by the tax rate (6%). To convert the percentage to a decimal, divide it by 100. For example:

```python
tax_rate = 0.06 # 6% as a decimal
tax_amount = tax_rate * subtotal
```

4. Calculate the total amount by adding the subtotal and the tax amount. For example:

```python
total_amount = subtotal + tax_amount
```

5. Display the output, including the price of each item, subtotal amount, tax amount, and final amount. You can use the `print()` function to display the output. For example:

```python
print("Price of item 1: $", item1)
print("Price of item 2: $", item2)
print("Price of item 3: $", item3)
print("Subtotal: $", subtotal)
print("Tax amount: $", tax_amount)
print("Total amount: $", total_amount)
```

With these steps, you have successfully written a program that emulates a cash register and provides the necessary information to the user.