This time we would like the user to enter the following details for 3 items: name, cost price and quantity. Your program should the print out a receipt including a tax amount of 11.75% on the subtotal of all the three items entered. The receipt should be formatted in columns with 30 characters for the name, 10 characters for the quantity, 10 characters for the price, and 10 characters for the total.
Sample run 1:

Item Quantity Price Total
Lollipops 10 0.50 5.00
Sweets 4 1.45 5.80
Chocolate bar 20 0.75 15.00
Subtotal 25.80
11.75% sales tax 3.03
Total 28.83

Reverend Jim commented: Lazy -3

@Elifas.
Did you bother to spend even a few moments reading the "Read this before posting a question" at the top of the page?

We do not waste time helping people who are so lazy that all they can do is post their homework task verbatim and wait for someone else to do something.

We help a lot pf people here, and we will help you, but only of you show some effort first.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.