Back
Close

Carpaccio programming JS

jlandure
23.4K views

We want to build our ecommerce website to sell our products. We will build a retail calculator. It is a runnable application with three inputs and one output.

Our model is a B2B and B2C company so we want to sell to big companies and also simple customers.

Be simple: in our platform, only one item can be bought at the time.

The product must accept 3 inputs from the user:

  • How many items
  • Price per item
  • 2-letters state code

The program have to output the total price.

Give a discount base on the total price and don't forget to add the tax to the discounted price depending on the state tax rate.

Here is the table of discount rate:

Order valueDiscount Rate
$1,0003%
$5,0005%
$7,0007%
$10,00010%
$50,00015%

Here is the table of tax rate:

StateTax rate
UT3%
NV5%
TX7%
AL10%
CA15%
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io