Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVASCRIPT Simple sales app: Your web site sells bags of coffee for the Save the Aardvarks Foundation. You sell regular coffee at $9/bag, you sell

JAVASCRIPT

Simple sales app:

Your web site sells bags of coffee for the Save the Aardvarks Foundation. You sell regular coffee at $9/bag, you sell decaffeinated coffee at $8/bag, and you sell mocha coffee for $11/bag. If the user buys more than $100 worth, they get a $15 discount. Use the prompt to ask the user how many bags of regular coffee s/he wants. Then use the prompt to ask about decaf, and then about mocha. Using the input, calculate the total amount the user will pay.

2. If the total is over $100, subtract $15 from their total. Write out their receipt to the web page, by writing out how many bags of regular they purchased and how much that works out to, then how many bags of decaf and how much that works out to, and then how many bags of mocha they purchased and how much that works out to. Finally write out how much the total will be. So, for example, after running the script, the web page might look like this: You purchased 3 bags of regular, totaling 27 dollars. You purchased 2 bags of decaf, totaling 16 dollars. You purchased 6 bags of mocha, totaling 66 dollars. Your total purchase cost is 93 dollars.

what information do you need? everything is here. thanks!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

1. Organize and support your main points

Answered: 1 week ago

Question

3. Move smoothly from point to point

Answered: 1 week ago

Question

5. Develop a strong introduction, a crucial part of all speeches

Answered: 1 week ago